mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
Implement seafarer profile requirement gate to ensure complete profile before registration
This commit is contained in:
@@ -38,21 +38,32 @@ export const PROFILE_FIELDS = [
|
||||
|
||||
export type ProfileField = (typeof PROFILE_FIELDS)[number];
|
||||
|
||||
/** Which `/profile` tab collects a field — used to build deep links. */
|
||||
export const PROFILE_FIELD_SECTION: Record<ProfileField, 'personal' | 'address' | 'emergency'> = {
|
||||
firstName: 'personal',
|
||||
middleName: 'personal',
|
||||
lastName: 'personal',
|
||||
gender: 'personal',
|
||||
dob: 'personal',
|
||||
pob: 'personal',
|
||||
maritalStatus: 'personal',
|
||||
professionId: 'personal',
|
||||
/**
|
||||
* Which `/profile` tab collects a field — used to build deep links.
|
||||
*
|
||||
* `personal` here means the Personal tab (account details: name, username,
|
||||
* email, phone), which is `/profile`'s `'personal'` panel. Name/DOB/gender/
|
||||
* profession live on the *Maritime Profile* panel instead, whose tab key is
|
||||
* `'profile'` — easy to conflate with the field-section name of the same
|
||||
* word, so it's called out here rather than left implicit.
|
||||
*/
|
||||
export const PROFILE_FIELD_SECTION: Record<
|
||||
ProfileField,
|
||||
'personal' | 'profile' | 'address' | 'emergency'
|
||||
> = {
|
||||
firstName: 'profile',
|
||||
middleName: 'profile',
|
||||
lastName: 'profile',
|
||||
gender: 'profile',
|
||||
dob: 'profile',
|
||||
pob: 'profile',
|
||||
maritalStatus: 'profile',
|
||||
professionId: 'profile',
|
||||
idType: 'address',
|
||||
idNumber: 'address',
|
||||
nationality: 'address',
|
||||
primaryPhoneNumber: 'address',
|
||||
email: 'address',
|
||||
primaryPhoneNumber: 'personal',
|
||||
email: 'personal',
|
||||
regionId: 'address',
|
||||
cityId: 'address',
|
||||
subCityId: 'address',
|
||||
|
||||
Reference in New Issue
Block a user