@7365admin1/layer-common 3.0.30-staging.4 → 3.0.30-staging.5
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/components/VisitorForm.vue +10 -2
- package/package.json +1 -1
|
@@ -155,9 +155,13 @@
|
|
|
155
155
|
<v-col v-if="shouldShowField('plateNumber')" cols="12">
|
|
156
156
|
<v-row>
|
|
157
157
|
<v-col cols="12">
|
|
158
|
-
<InputLabel class="text-capitalize" title="Vehicle Number" required />
|
|
158
|
+
<InputLabel class="text-capitalize" title="Vehicle Number" :required="isVehicleRequired" />
|
|
159
159
|
<!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
|
|
160
|
-
<InputVehicleNumber
|
|
160
|
+
<InputVehicleNumber
|
|
161
|
+
v-model="visitor.plateNumber"
|
|
162
|
+
:rules="[isVehicleRequired ? requiredRule : () => true]"
|
|
163
|
+
density="comfortable"
|
|
164
|
+
/>
|
|
161
165
|
</v-col>
|
|
162
166
|
</v-row>
|
|
163
167
|
</v-col>
|
|
@@ -635,6 +639,10 @@ const requireNRIC = computed(() => {
|
|
|
635
639
|
return prop.type !== "walk-in" && prop.type !== "guest";
|
|
636
640
|
});
|
|
637
641
|
|
|
642
|
+
const isVehicleRequired = computed(() => {
|
|
643
|
+
return ["guest", "drop-off", "pick-up"].includes(prop.type);
|
|
644
|
+
});
|
|
645
|
+
|
|
638
646
|
const hidQrCodePassConfig = computed(() => {
|
|
639
647
|
return (siteData.value as any)?.metadata?.hidQrCodePass || {};
|
|
640
648
|
});
|