@7365admin1/layer-common 3.1.2-staging.33 → 3.1.2-staging.35
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 +63 -12
- package/package.json +1 -1
|
@@ -36,10 +36,17 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<v-list v-if="nricSearchResults.length" class="pa-1 phone-search-results">
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
<div class="search-results-scroll">
|
|
40
|
+
<v-list-item v-for="(item, index) in nricSearchResults" :key="item._id || index"
|
|
41
|
+
@click="selectNricSearchResult(item)" class="cursor-pointer nric-search-item">
|
|
42
|
+
<VisitorSearchResultSummary :item="item" />
|
|
43
|
+
</v-list-item>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="search-results-close pa-1">
|
|
46
|
+
<v-btn block variant="flat" color="red" @click.stop="closeAutofillSearchResults('nric')">
|
|
47
|
+
Close
|
|
48
|
+
</v-btn>
|
|
49
|
+
</div>
|
|
43
50
|
</v-list>
|
|
44
51
|
</v-menu>
|
|
45
52
|
</v-col>
|
|
@@ -58,10 +65,17 @@
|
|
|
58
65
|
</template>
|
|
59
66
|
|
|
60
67
|
<v-list v-if="phoneSearchResults.length" class="pa-1 phone-search-results">
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
<div class="search-results-scroll">
|
|
69
|
+
<v-list-item v-for="(item, index) in phoneSearchResults" :key="item._id || index"
|
|
70
|
+
@click="selectPhoneNumberSearchResult(item)" class="cursor-pointer nric-search-item">
|
|
71
|
+
<VisitorSearchResultSummary :item="item" />
|
|
72
|
+
</v-list-item>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="search-results-close pa-1">
|
|
75
|
+
<v-btn block variant="flat" color="red" @click.stop="closeAutofillSearchResults('contact')">
|
|
76
|
+
Close
|
|
77
|
+
</v-btn>
|
|
78
|
+
</div>
|
|
65
79
|
</v-list>
|
|
66
80
|
</v-menu>
|
|
67
81
|
</v-col>
|
|
@@ -82,10 +96,18 @@
|
|
|
82
96
|
</template>
|
|
83
97
|
|
|
84
98
|
<v-list v-if="vehicleSearchResults.length" class="pa-1 phone-search-results">
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
<div class="search-results-scroll">
|
|
100
|
+
<v-list-item v-for="(item, index) in vehicleSearchResults" :key="item._id || index"
|
|
101
|
+
@click="selectPlateNumberSearchResult(item)" class="cursor-pointer nric-search-item">
|
|
102
|
+
<VisitorSearchResultSummary :item="item" />
|
|
103
|
+
</v-list-item>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="search-results-close pa-1">
|
|
106
|
+
<v-btn block variant="flat" color="red"
|
|
107
|
+
@click.stop="closeAutofillSearchResults('vehicleNumber')">
|
|
108
|
+
Close
|
|
109
|
+
</v-btn>
|
|
110
|
+
</div>
|
|
89
111
|
</v-list>
|
|
90
112
|
</v-menu>
|
|
91
113
|
</v-col>
|
|
@@ -1066,6 +1088,23 @@ function selectAutofillSearchResult(item: Partial<TPeople>, source: Exclude<Auto
|
|
|
1066
1088
|
});
|
|
1067
1089
|
}
|
|
1068
1090
|
|
|
1091
|
+
function closeAutofillSearchResults(source: Exclude<AutofillSource, null>) {
|
|
1092
|
+
if (source === "nric") {
|
|
1093
|
+
nricSearchMenu.value = false;
|
|
1094
|
+
nricSearchResults.value = [];
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
if (source === "contact") {
|
|
1098
|
+
phoneSearchMenu.value = false;
|
|
1099
|
+
phoneSearchResults.value = [];
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
if (source === "vehicleNumber") {
|
|
1103
|
+
vehicleSearchMenu.value = false;
|
|
1104
|
+
vehicleSearchResults.value = [];
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1069
1108
|
function closeNricAutofillOptions() {
|
|
1070
1109
|
dialog.nricAutofillOptions = false;
|
|
1071
1110
|
selectedNricSearchResult.value = null;
|
|
@@ -2108,10 +2147,22 @@ onMounted(() => {
|
|
|
2108
2147
|
}
|
|
2109
2148
|
|
|
2110
2149
|
.phone-search-results {
|
|
2150
|
+
display: flex;
|
|
2151
|
+
flex-direction: column;
|
|
2111
2152
|
max-height: 400px;
|
|
2153
|
+
overflow: hidden;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.search-results-scroll {
|
|
2157
|
+
flex: 1 1 auto;
|
|
2158
|
+
min-height: 0;
|
|
2112
2159
|
overflow-y: auto;
|
|
2113
2160
|
}
|
|
2114
2161
|
|
|
2162
|
+
.search-results-close {
|
|
2163
|
+
flex: 0 0 auto;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2115
2166
|
.nric-options-card {
|
|
2116
2167
|
border-radius: 16px !important;
|
|
2117
2168
|
}
|