@7365admin1/layer-common 3.1.0 → 3.1.1
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.
- package/CHANGELOG.md +6 -0
- package/components/VisitorForm.vue +3 -108
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -121,76 +121,9 @@
|
|
|
121
121
|
</v-row>
|
|
122
122
|
</v-col>
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
<v-row>
|
|
126
|
-
<v-col cols="12">
|
|
127
|
-
<InputLabel class="text-capitalize" title="NRIC" :required="requireNRIC" />
|
|
128
|
-
<v-menu v-model="nricSearchMenu" location="bottom" offset-y :close-on-content-click="false">
|
|
129
|
-
<template #activator="{ props }">
|
|
130
|
-
<InputNRICNumber v-bind="props" v-model="visitor.nric" density="comfortable" @focus="isNricFieldFocused = true" @blur="isNricFieldFocused = false"
|
|
131
|
-
:rules="[requireNRIC ? requiredRule : () => true]" :key="currentAutofillSource + 'nric-key'"
|
|
132
|
-
@update:model-value="handleUpdateNRIC" :loading="fetchPersonByNRICPending" />
|
|
133
|
-
</template>
|
|
134
|
-
|
|
135
|
-
<v-list v-if="nricSearchResults.length" class="pa-1">
|
|
136
|
-
<v-list-item v-for="(item, index) in nricSearchResults" :key="item._id || index"
|
|
137
|
-
@click="selectNricSearchResult(item)" class="cursor-pointer">
|
|
138
|
-
<v-list-item-title>{{ item.name || 'Unknown' }}</v-list-item-title>
|
|
139
|
-
<v-list-item-subtitle>{{ item.contact }}</v-list-item-subtitle>
|
|
140
|
-
</v-list-item>
|
|
141
|
-
</v-list>
|
|
142
|
-
</v-menu>
|
|
143
|
-
</v-col>
|
|
144
|
-
</v-row>
|
|
145
|
-
</v-col>
|
|
146
|
-
|
|
147
|
-
<v-col v-if="shouldShowField('contact')" cols="12">
|
|
148
|
-
<InputLabel class="text-capitalize" title="Phone Number" required />
|
|
149
|
-
<v-menu v-model="phoneSearchMenu" location="bottom" offset-y :close-on-content-click="false">
|
|
150
|
-
<template #activator="{ props }">
|
|
151
|
-
<InputPhoneNumberV2 v-bind="props" v-model="visitor.contact" :rules="[requiredRule]" @focus="isPhoneFieldFocused = true" @blur="isPhoneFieldFocused = false"
|
|
152
|
-
density="comfortable" :key="currentAutofillSource + 'phone-key'"
|
|
153
|
-
@update:model-value="handleUpdatePhoneNumber" />
|
|
154
|
-
</template>
|
|
124
|
+
|
|
155
125
|
|
|
156
|
-
|
|
157
|
-
<v-list-item v-for="(item, index) in phoneSearchResults" :key="item._id || index"
|
|
158
|
-
@click="selectPhoneNumberSearchResult(item)" class="cursor-pointer nric-search-item">
|
|
159
|
-
<div class="d-flex align-center justify-space-between ga-4 w-100">
|
|
160
|
-
<span class="text-subtitle-1">{{ item.name || 'Unknown' }}</span>
|
|
161
|
-
<span class="text-subtitle-1 text-no-wrap">NRIC: {{ item.nric || 'N/A' }}</span>
|
|
162
|
-
</div>
|
|
163
|
-
</v-list-item>
|
|
164
|
-
</v-list>
|
|
165
|
-
</v-menu>
|
|
166
|
-
</v-col>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<v-col v-if="shouldShowField('plateNumber')" cols="12">
|
|
170
|
-
<v-row>
|
|
171
|
-
<v-col cols="12">
|
|
172
|
-
<InputLabel class="text-capitalize" title="Vehicle Number" :required="isVehicleRequired" />
|
|
173
|
-
<!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
|
|
174
|
-
<v-menu v-model="vehicleSearchMenu" location="bottom" offset-y :close-on-content-click="false">
|
|
175
|
-
<template #activator="{ props }">
|
|
176
|
-
<InputVehicleNumber v-bind="props" v-model="visitor.plateNumber" density="comfortable"
|
|
177
|
-
@update:model-value="handleUpdateVehicleNumber" @focus="isPlateNumberFieldFocused = true" @blur="isPlateNumberFieldFocused = false" />
|
|
178
|
-
</template>
|
|
179
|
-
|
|
180
|
-
<v-list v-if="vehicleSearchResults.length" class="pa-1">
|
|
181
|
-
<v-list-item v-for="(item, index) in vehicleSearchResults" :key="item._id || index"
|
|
182
|
-
@click="selectPlateNumberSearchResult(item)"
|
|
183
|
-
class="cursor-pointer nric-search-item">
|
|
184
|
-
<div class="d-flex align-center justify-space-between ga-4 w-100">
|
|
185
|
-
<span class="text-subtitle-1">{{ item.name || 'Unknown' }}</span>
|
|
186
|
-
<span class="text-subtitle-1 text-no-wrap">NRIC: {{ item.nric || 'N/A' }}</span>
|
|
187
|
-
</div>
|
|
188
|
-
</v-list-item>
|
|
189
|
-
</v-list>
|
|
190
|
-
</v-menu>
|
|
191
|
-
</v-col>
|
|
192
|
-
</v-row>
|
|
193
|
-
</v-col>
|
|
126
|
+
|
|
194
127
|
|
|
195
128
|
<v-col v-if="shouldShowField('deliveryType')" cols="12">
|
|
196
129
|
<v-row>
|
|
@@ -230,36 +163,7 @@
|
|
|
230
163
|
</v-col>
|
|
231
164
|
</template>
|
|
232
165
|
|
|
233
|
-
|
|
234
|
-
<v-col cols="12">
|
|
235
|
-
<InputLabel class="text-capitalize" title="Delivery Company" />
|
|
236
|
-
<v-combobox v-model="deliveryCompany" v-model:search="deliveryCompanyInput" ref="companyCombo"
|
|
237
|
-
autocomplete="off" :hide-no-data="false" :items="deliveryCompanyList" item-value="value"
|
|
238
|
-
:loading="siteDataPending" variant="outlined" density="comfortable" persistent-hint small-chips>
|
|
239
|
-
<template v-slot:no-data>
|
|
240
|
-
<v-list-item>
|
|
241
|
-
<v-list-item-title v-if="fetchCompanyListPending">
|
|
242
|
-
<v-progress-circular indeterminate size="20" class="mr-3" />
|
|
243
|
-
Searching companies…
|
|
244
|
-
</v-list-item-title>
|
|
245
|
-
<v-list-item-title v-else-if="companyNameInput" @click.stop="handleAddNewCompany"
|
|
246
|
-
class="d-flex align-center ga-1">
|
|
247
|
-
<span><v-icon icon="mdi-plus" /></span>Add "<strong>{{
|
|
248
|
-
companyNameInput
|
|
249
|
-
}}</strong>" as new company.
|
|
250
|
-
</v-list-item-title>
|
|
251
|
-
<v-list-item-title v-else-if="!companyNameInput && companyNames.length === 0">
|
|
252
|
-
Start typing to search for companies.
|
|
253
|
-
</v-list-item-title>
|
|
254
|
-
<v-list-item-title v-else>
|
|
255
|
-
No companies available. Start typing to add a new one.
|
|
256
|
-
</v-list-item-title>
|
|
257
|
-
</v-list-item>
|
|
258
|
-
</template>
|
|
259
|
-
</v-combobox>
|
|
260
|
-
</v-col>
|
|
261
|
-
</template>
|
|
262
|
-
|
|
166
|
+
|
|
263
167
|
<template v-if="shouldShowField('delivery-company')">
|
|
264
168
|
<v-col cols="12">
|
|
265
169
|
<InputLabel class="text-capitalize" title="Delivery Company" />
|
|
@@ -290,15 +194,6 @@
|
|
|
290
194
|
</v-col>
|
|
291
195
|
</template>
|
|
292
196
|
|
|
293
|
-
<v-col v-if="shouldShowField('plateNumber')" cols="12">
|
|
294
|
-
<v-row>
|
|
295
|
-
<v-col cols="12">
|
|
296
|
-
<InputLabel class="text-capitalize" title="Vehicle Number" required />
|
|
297
|
-
<!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
|
|
298
|
-
<InputVehicleNumber v-model="visitor.plateNumber" density="comfortable" />
|
|
299
|
-
</v-col>
|
|
300
|
-
</v-row>
|
|
301
|
-
</v-col>
|
|
302
197
|
|
|
303
198
|
<v-col v-if="shouldShowField('block')" cols="12">
|
|
304
199
|
<InputLabel class="text-capitalize" title="Block" required />
|