@7365admin1/layer-common 4.1.2-staging.245 → 4.1.2-staging.247
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.
|
@@ -35,9 +35,15 @@ const dateFormattedReadOnly = ref<string | null>(null)
|
|
|
35
35
|
|
|
36
36
|
const dateInput = ref<HTMLInputElement | null>(null)
|
|
37
37
|
const datePickerRef = ref<HTMLInputElement | null>(null)
|
|
38
|
+
let nativeInput: HTMLInputElement | null = null
|
|
38
39
|
|
|
39
40
|
const isInitialLoad = ref(true)
|
|
40
41
|
|
|
42
|
+
function handleNativeInputClick(e: MouseEvent) {
|
|
43
|
+
e.stopPropagation()
|
|
44
|
+
openDatePicker()
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
function clearDate() {
|
|
42
48
|
date.value = null
|
|
43
49
|
dateFormattedReadOnly.value = null
|
|
@@ -88,15 +94,17 @@ watch(date, () => {
|
|
|
88
94
|
onMounted(async () => {
|
|
89
95
|
await nextTick()
|
|
90
96
|
isInitialLoad.value = false
|
|
91
|
-
|
|
97
|
+
nativeInput = (datePickerRef.value as any)?.$el?.querySelector('input')
|
|
92
98
|
if (nativeInput) {
|
|
93
|
-
nativeInput.addEventListener('click',
|
|
94
|
-
e.stopPropagation()
|
|
95
|
-
openDatePicker()
|
|
96
|
-
})
|
|
99
|
+
nativeInput.addEventListener('click', handleNativeInputClick)
|
|
97
100
|
}
|
|
98
101
|
})
|
|
99
102
|
|
|
103
|
+
onBeforeUnmount(() => {
|
|
104
|
+
nativeInput?.removeEventListener('click', handleNativeInputClick)
|
|
105
|
+
nativeInput = null
|
|
106
|
+
})
|
|
107
|
+
|
|
100
108
|
defineExpose({
|
|
101
109
|
validate
|
|
102
110
|
})
|
|
@@ -70,9 +70,15 @@ const inputPlaceholder = computed(
|
|
|
70
70
|
|
|
71
71
|
const dateInput = ref<HTMLInputElement | null>(null);
|
|
72
72
|
const dateTimePickerRef = ref<HTMLInputElement | null>(null);
|
|
73
|
+
let nativeInput: HTMLInputElement | null = null;
|
|
73
74
|
|
|
74
75
|
const isInitialLoad = ref(true);
|
|
75
76
|
|
|
77
|
+
function handleNativeInputClick(e: MouseEvent) {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
openDatePicker();
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
function openDatePicker() {
|
|
77
83
|
setTimeout(() => {
|
|
78
84
|
dateInput.value?.showPicker?.();
|
|
@@ -177,17 +183,19 @@ onMounted(async () => {
|
|
|
177
183
|
await nextTick();
|
|
178
184
|
isInitialLoad.value = false;
|
|
179
185
|
// Wait until Vuetify renders its internal input
|
|
180
|
-
|
|
186
|
+
nativeInput = (dateTimePickerRef.value as any)?.$el?.querySelector(
|
|
181
187
|
"input"
|
|
182
188
|
);
|
|
183
189
|
if (nativeInput) {
|
|
184
|
-
nativeInput.addEventListener("click",
|
|
185
|
-
e.stopPropagation();
|
|
186
|
-
openDatePicker();
|
|
187
|
-
});
|
|
190
|
+
nativeInput.addEventListener("click", handleNativeInputClick);
|
|
188
191
|
}
|
|
189
192
|
});
|
|
190
193
|
|
|
194
|
+
onBeforeUnmount(() => {
|
|
195
|
+
nativeInput?.removeEventListener("click", handleNativeInputClick);
|
|
196
|
+
nativeInput = null;
|
|
197
|
+
});
|
|
198
|
+
|
|
191
199
|
defineExpose({
|
|
192
200
|
validate,
|
|
193
201
|
});
|
|
@@ -1758,9 +1758,14 @@ function closeApproveRejectVisitorDialog() {
|
|
|
1758
1758
|
async function updateVisitorApprovalStatus() {
|
|
1759
1759
|
isApprovingRejectingVisitor.value = true;
|
|
1760
1760
|
try {
|
|
1761
|
-
|
|
1761
|
+
const approval = {
|
|
1762
|
+
approvedBy: currentUser.value?._id,
|
|
1762
1763
|
status: approveRejectVisitorDialog.value.status,
|
|
1763
1764
|
remarks: visitorApproveRejectRemarks.value,
|
|
1765
|
+
approvedAt: new Date(),
|
|
1766
|
+
};
|
|
1767
|
+
await updateVisitor(selectedVisitorForApproval.value._id, {
|
|
1768
|
+
approval,
|
|
1764
1769
|
updatedBy: currentUser.value?._id,
|
|
1765
1770
|
} as any);
|
|
1766
1771
|
showMessage(
|
|
@@ -1891,7 +1896,9 @@ const {
|
|
|
1891
1896
|
// A self-service submission awaiting Approve/Reject (Self-Service
|
|
1892
1897
|
// Auto-Approvals off) lands here as "pending" alongside already
|
|
1893
1898
|
// "approved" guests, rather than being hidden until someone acts on it.
|
|
1894
|
-
|
|
1899
|
+
// "rejected" is included too, so a rejected submission stays visible
|
|
1900
|
+
// on this tab instead of disappearing once acted on.
|
|
1901
|
+
params.status = "approved,pending,rejected";
|
|
1895
1902
|
} else if (activeTab.value === "resident-transactions") {
|
|
1896
1903
|
params.status = "registered";
|
|
1897
1904
|
params.type = "resident,tenant";
|
|
@@ -2429,7 +2436,7 @@ function buildReportParams(): any {
|
|
|
2429
2436
|
// report generated from this tab would silently omit contractors and
|
|
2430
2437
|
// pending rows the screen is actually showing.
|
|
2431
2438
|
params.type = "guest,contractor";
|
|
2432
|
-
params.status = "approved,pending";
|
|
2439
|
+
params.status = "approved,pending,rejected";
|
|
2433
2440
|
} else if (activeTab.value === "resident-transactions") {
|
|
2434
2441
|
params.status = "registered";
|
|
2435
2442
|
params.type = "resident,tenant";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.1.2-staging.
|
|
5
|
+
"version": "4.1.2-staging.247",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|