Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI - first name optional #378

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion strr-base-web/app/stores/strrContact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useStrrContactStore = defineStore('strr/contact', () => {
const { userFullName } = storeToRefs(useConnectAccountStore())
const getContactSchema = (completingParty = false) => {
return z.object({
firstName: getRequiredNonEmptyString(t('validation.name.first')),
firstName: optionalOrEmptyString,
middleName: optionalOrEmptyString,
lastName: getRequiredNonEmptyString(t('validation.name.last')),
position: completingParty ? optionalOrEmptyString : getRequiredNonEmptyString(t('validation.position')),
Expand Down
4 changes: 2 additions & 2 deletions strr-base-web/app/utils/permitDashHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ export const getPartyItem = (party: Contact): ConnectAccordionItem => {
: party.phone.number
return {
showAvatar: true,
label: `${party.firstName || ''} ` +
label: (`${party.firstName || ''} ` +
`${party.middleName || ''} ` +
`${party.lastName || ''}`.replaceAll(' ', '').trim(),
`${party.lastName || ''}`).replaceAll(' ', ' ').trim(),
values: [
{
icon: 'i-mdi-at',
Expand Down
2 changes: 1 addition & 1 deletion strr-host-pm-web/app/stores/hostOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useHostOwnerStore = defineStore('host/owner', () => {
role: z.enum([OwnerRole.HOST, OwnerRole.CO_HOST, OwnerRole.PROPERTY_MANAGER], {
errorMap: () => ({ message: t('validation.ownerRole') })
}),
firstName: getRequiredNonEmptyString(t('validation.name.first')),
firstName: optionalOrEmptyString,
middleName: optionalOrEmptyString,
lastName: getRequiredNonEmptyString(t('validation.name.last')),
preferredName: optionalOrEmptyString,
Expand Down
2 changes: 1 addition & 1 deletion strr-platform-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "strr-platform-web",
"private": true,
"type": "module",
"version": "0.0.18",
"version": "0.0.19",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down
Loading