diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-23 17:11:33 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-23 17:11:33 +0700 |
| commit | 90710579ba1c12060877f6ec2d26103f9c31058d (patch) | |
| tree | 307032cfb8cd13b790c569bc443258b00b07684e /src-migrate/common/types | |
| parent | a001da95b9c03167656aec8a573cf60c12164b3f (diff) | |
Refactor and migrate register page
Diffstat (limited to 'src-migrate/common/types')
| -rw-r--r-- | src-migrate/common/types/auth.ts | 32 | ||||
| -rw-r--r-- | src-migrate/common/types/nav.ts | 4 | ||||
| -rw-r--r-- | src-migrate/common/types/odoo.ts | 6 | ||||
| -rw-r--r-- | src-migrate/common/types/pageContent.ts | 5 |
4 files changed, 47 insertions, 0 deletions
diff --git a/src-migrate/common/types/auth.ts b/src-migrate/common/types/auth.ts new file mode 100644 index 00000000..63fac6e0 --- /dev/null +++ b/src-migrate/common/types/auth.ts @@ -0,0 +1,32 @@ +import { OdooApiProps } from './odoo'; + +export type AuthProps = { + id: number; + parent_id: number; + parent_name: string; + partner_id: number; + name: string; + email: string; + phone: string; + mobile: string; + external: boolean; + company: boolean; + pricelist: string | null; + token: string; +}; + +export type AuthApiProps = OdooApiProps & { result: AuthProps }; + +export type RegisterProps = { + name: string; + email: string; + password: string; + company: string; +}; + +export type RegisterApiProps = OdooApiProps & { + result: { + register: boolean; + reason?: 'EMAIL_USED'; + }; +}; diff --git a/src-migrate/common/types/nav.ts b/src-migrate/common/types/nav.ts new file mode 100644 index 00000000..ba97b1bf --- /dev/null +++ b/src-migrate/common/types/nav.ts @@ -0,0 +1,4 @@ +export type SecondaryNavItemProps = { + label: string + href: string +} diff --git a/src-migrate/common/types/odoo.ts b/src-migrate/common/types/odoo.ts new file mode 100644 index 00000000..b34bc667 --- /dev/null +++ b/src-migrate/common/types/odoo.ts @@ -0,0 +1,6 @@ +export type OdooApiProps = { + status: { + code: number; + description: string; + }; +}; diff --git a/src-migrate/common/types/pageContent.ts b/src-migrate/common/types/pageContent.ts new file mode 100644 index 00000000..4361deb7 --- /dev/null +++ b/src-migrate/common/types/pageContent.ts @@ -0,0 +1,5 @@ +export type PageContentProps = { + id: number; + url_path: string; + content: string; +} | null; |
