@7365admin1/layer-common 3.0.31-staging.12 → 3.0.31-staging.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  <div class="w-100 d-flex justify-space-between ga-2">
13
13
  <span class="text-subtitle-1 w-100 font-weight-bold mb-3">{{
14
14
  formTitle
15
- }}</span>
15
+ }}</span>
16
16
  <span v-if="withStep2 || withStep3" class="text-subtitle-2 font-weight-bold" style="text-wrap: nowrap">Step
17
17
  <span class="text-primary-button">{{ contractorStep }}</span>/{{ withStep3 ? 3 : withStep2 ? 2 : 1 }}</span>
18
18
  </div>
@@ -30,7 +30,7 @@
30
30
  <v-list-item-title @click.stop="handleAddNewContractorType" class="d-flex align-center ga-1">
31
31
  <span><v-icon icon="mdi-plus" /></span> Add "<strong>{{
32
32
  contractorTypeInput
33
- }}</strong>" as custom contractor type.
33
+ }}</strong>" as custom contractor type.
34
34
  </v-list-item-title>
35
35
  </v-list-item>
36
36
  </template>
@@ -99,16 +99,38 @@
99
99
  <span class="text-subtitle-1">{{ item.name || 'Unknown' }}</span>
100
100
  <span class="text-subtitle-1 text-no-wrap">NRIC: {{ item.nric || 'N/A' }}</span>
101
101
  </div>
102
- <div v-if="getPersonContactOptions(item).length < 2 && getPersonPlateOptions(item).length < 2"
103
- class="d-flex align-center justify-space-between ga-4 w-100">
104
- <span class="text-subtitle-1">{{ getPersonContactOptions(item)[0] || 'N/A' }}</span>
105
- <span class="text-subtitle-1 text-no-wrap">{{ getPersonPlateOptions(item)[0] || 'N/A' }}</span>
106
- </div>
107
102
  </v-list-item>
108
103
  </v-list>
109
104
  </v-menu>
110
105
  </v-col>
111
106
 
107
+
108
+ <v-col v-if="shouldShowField('plateNumber')" cols="12">
109
+ <v-row>
110
+ <v-col cols="12">
111
+ <InputLabel class="text-capitalize" title="Vehicle Number" :required="isVehicleRequired" />
112
+ <!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
113
+ <v-menu v-model="vehicleSearchMenu" location="bottom" offset-y :close-on-content-click="false">
114
+ <template #activator="{ props }">
115
+ <InputVehicleNumber v-bind="props" v-model="visitor.plateNumber" density="comfortable"
116
+ @update:model-value="handleUpdateVehicleNumber" />
117
+ </template>
118
+
119
+ <v-list v-if="vehicleSearchResults.length" class="pa-1">
120
+ <v-list-item v-for="(item, index) in vehicleSearchResults" :key="item._id || index"
121
+ @click="selectAutofillSearchResult(item, 'vehicleNumber')"
122
+ class="cursor-pointer nric-search-item">
123
+ <div class="d-flex align-center justify-space-between ga-4 w-100">
124
+ <span class="text-subtitle-1">{{ item.name || 'Unknown' }}</span>
125
+ <span class="text-subtitle-1 text-no-wrap">NRIC: {{ item.nric || 'N/A' }}</span>
126
+ </div>
127
+ </v-list-item>
128
+ </v-list>
129
+ </v-menu>
130
+ </v-col>
131
+ </v-row>
132
+ </v-col>
133
+
112
134
  <v-col v-if="shouldShowField('deliveryType')" cols="12">
113
135
  <v-row>
114
136
  <v-col cols="12">
@@ -137,7 +159,7 @@
137
159
  class="d-flex align-center ga-1">
138
160
  <span><v-icon icon="mdi-plus" /></span>Add "<strong>{{
139
161
  companyNameInput
140
- }}</strong>" as new company.
162
+ }}</strong>" as new company.
141
163
  </v-list-item-title>
142
164
  <v-list-item-title v-else-if="!companyNameInput && companyNames.length === 0">
143
165
  Start typing to search for companies.
@@ -167,7 +189,7 @@
167
189
  class="d-flex align-center ga-1">
168
190
  <span><v-icon icon="mdi-plus" /></span>Add "<strong>{{
169
191
  companyNameInput
170
- }}</strong>" as new company.
192
+ }}</strong>" as new company.
171
193
  </v-list-item-title>
172
194
  <v-list-item-title v-else-if="!companyNameInput && companyNames.length === 0">
173
195
  Start typing to search for companies.
@@ -181,36 +203,7 @@
181
203
  </v-col>
182
204
  </template>
183
205
 
184
- <v-col v-if="shouldShowField('plateNumber')" cols="12">
185
- <v-row>
186
- <v-col cols="12">
187
- <InputLabel class="text-capitalize" title="Vehicle Number" :required="isVehicleRequired" />
188
- <!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
189
- <v-menu v-model="vehicleSearchMenu" location="bottom" offset-y :close-on-content-click="false">
190
- <template #activator="{ props }">
191
- <InputVehicleNumber v-bind="props" v-model="visitor.plateNumber" density="comfortable"
192
- @update:model-value="handleUpdateVehicleNumber" />
193
- </template>
194
206
 
195
- <v-list v-if="vehicleSearchResults.length" class="pa-1">
196
- <v-list-item v-for="(item, index) in vehicleSearchResults" :key="item._id || index"
197
- @click="selectAutofillSearchResult(item, 'vehicleNumber')"
198
- class="cursor-pointer nric-search-item">
199
- <div class="d-flex align-center justify-space-between ga-4 w-100">
200
- <span class="text-subtitle-1">{{ item.name || 'Unknown' }}</span>
201
- <span class="text-subtitle-1 text-no-wrap">NRIC: {{ item.nric || 'N/A' }}</span>
202
- </div>
203
- <div v-if="getPersonContactOptions(item).length < 2 && getPersonPlateOptions(item).length < 2"
204
- class="d-flex align-center justify-space-between ga-4 w-100">
205
- <span class="text-subtitle-1">{{ getPersonContactOptions(item)[0] || 'N/A' }}</span>
206
- <span class="text-subtitle-1 text-no-wrap">{{ getPersonPlateOptions(item)[0] || 'N/A' }}</span>
207
- </div>
208
- </v-list-item>
209
- </v-list>
210
- </v-menu>
211
- </v-col>
212
- </v-row>
213
- </v-col>
214
207
 
215
208
  <v-col v-if="shouldShowField('block')" cols="12">
216
209
  <InputLabel class="text-capitalize" title="Block" required />
@@ -431,7 +424,7 @@
431
424
  </v-data-table>
432
425
 
433
426
  <div class="d-flex justify-end mt-8">
434
- <v-btn v-if="!skipNonCheckedOutNric" color="red" variant="flat" size="large" class="text-none px-10"
427
+ <v-btn v-if="!skipNonCheckedOutNric" color="red" variant="flat" size="large" class="text-none px-10"
435
428
  :loading="loading.searchingNonCheckedOut" @click="handleSkipNricNonCheckedOut">
436
429
  Skip NRIC: {{ visitor.nric || "N/A" }}
437
430
  </v-btn>
@@ -1012,7 +1005,7 @@ function selectAutofillSearchResult(item: Partial<TPeople>, source: Exclude<Auto
1012
1005
  const contactOptions = getPersonContactOptions(item);
1013
1006
  const plateOptions = getPersonPlateOptions(item);
1014
1007
 
1015
- if (contactOptions.length > 1 || plateOptions.length > 1) {
1008
+ if (source === "nric" && (contactOptions.length > 1 || plateOptions.length > 1)) {
1016
1009
  nricSearchMenu.value = false;
1017
1010
  phoneSearchMenu.value = false;
1018
1011
  vehicleSearchMenu.value = false;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.0.31-staging.12",
5
+ "version": "3.0.31-staging.13",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {