Implement seafarer profile requirement gate to ensure complete profile before registration

This commit is contained in:
estifanos
2026-08-08 08:35:40 +00:00
parent 1116e57a8d
commit fbf948b3d3
7 changed files with 175 additions and 14 deletions

View File

@@ -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',