@fewangsit/wangsvue-fats 1.0.1-alpha.50 → 1.0.1-alpha.52
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/basecalendar/index.es.js +270 -261
- package/disposalreport/index.d.ts +62 -0
- package/disposalreport/index.es.js +17 -14
- package/disposalreportdialogselectasset/index.es.js +238 -0
- package/disposalreporttable/index.es.js +256 -137
- package/disposalreporttablefilter/index.es.js +17 -45
- package/icon/index.d.ts +1 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/style.css +1 -1
- package/vendor/luxon/src/datetime.es.js +1845 -0
- package/vendor/luxon/src/duration.es.js +734 -0
- package/vendor/luxon/src/errors.es.js +40 -0
- package/vendor/luxon/src/impl/conversions.es.js +92 -0
- package/vendor/luxon/src/impl/diff.es.js +36 -0
- package/vendor/luxon/src/impl/digits.es.js +77 -0
- package/vendor/luxon/src/impl/english.es.js +132 -0
- package/vendor/luxon/src/impl/formats.es.js +150 -0
- package/vendor/luxon/src/impl/formatter.es.js +274 -0
- package/vendor/luxon/src/impl/invalid.es.js +11 -0
- package/vendor/luxon/src/impl/locale.es.js +293 -0
- package/vendor/luxon/src/impl/regexParser.es.js +202 -0
- package/vendor/luxon/src/impl/tokenParser.es.js +344 -0
- package/vendor/luxon/src/impl/util.es.js +217 -0
- package/vendor/luxon/src/impl/zoneUtil.es.js +19 -0
- package/vendor/luxon/src/info.es.js +180 -0
- package/vendor/luxon/src/interval.es.js +477 -0
- package/vendor/luxon/src/luxon.es.js +2 -0
- package/vendor/luxon/src/settings.es.js +150 -0
- package/vendor/luxon/src/zone.es.js +88 -0
- package/vendor/luxon/src/zones/IANAZone.es.js +181 -0
- package/vendor/luxon/src/zones/fixedOffsetZone.es.js +125 -0
- package/vendor/luxon/src/zones/invalidZone.es.js +41 -0
- package/vendor/luxon/src/zones/systemZone.es.js +47 -0
- package/wangsvue-fats.esm.browser.js +22804 -16970
- package/wangsvue-fats.system.js +73 -73
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AssetServices as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
1
|
+
import { defineComponent as V, onMounted as z, shallowRef as f, ref as W, createElementBlock as j, openBlock as H, Fragment as K, createElementVNode as g, createVNode as l, mergeProps as Q, unref as d, withCtx as X, toDisplayString as C } from "vue";
|
|
2
|
+
import { AssetServices as Y, DisposalServices as Z, DamageServices as B, MissingServices as O } from "@tagsamurai/fats-api-services";
|
|
3
|
+
import { u as ee } from "../assetinfo/index.es.js";
|
|
4
|
+
import { u as te } from "../plugins/basei18n.es.js";
|
|
5
5
|
import "../utils/role.util.es.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { _ as
|
|
6
|
+
import { u as se } from "../utils/toast.util.es.js";
|
|
7
|
+
import { _ as D } from "../badge/index.es.js";
|
|
8
8
|
import { _ as w } from "../button/index.es.js";
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { D as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as
|
|
17
|
-
|
|
9
|
+
import { _ as ae } from "../buttonfilter/index.es.js";
|
|
10
|
+
import { _ as oe } from "../buttonsearch/index.es.js";
|
|
11
|
+
import { D as re } from "../datatable/index.es.js";
|
|
12
|
+
import { _ as M } from "../dialogconfirm/index.es.js";
|
|
13
|
+
import { _ as ne } from "../image/index.es.js";
|
|
14
|
+
import { _ as le } from "../textarea/index.es.js";
|
|
15
|
+
import { _ as ie } from "../disposalreportbulkaction/index.es.js";
|
|
16
|
+
import { _ as de } from "../disposalreportdialogselectasset/index.es.js";
|
|
17
|
+
import { _ as pe } from "../disposalreporttablefilter/index.es.js";
|
|
18
|
+
const ue = {
|
|
18
19
|
class: "flex flex-col gap-2",
|
|
19
20
|
"data-ts-section": "disposalreporttablewrapper"
|
|
20
|
-
},
|
|
21
|
+
}, me = { class: "flex gap-1 justify-end" }, ce = { class: "flex gap-1 justify-end" }, Me = /* @__PURE__ */ V({
|
|
21
22
|
__name: "DisposalReportTable",
|
|
22
23
|
props: {
|
|
23
24
|
treeTable: { type: Boolean },
|
|
@@ -56,16 +57,19 @@ const Y = {
|
|
|
56
57
|
emptyTableMessage: {},
|
|
57
58
|
singleSelection: {},
|
|
58
59
|
router: {},
|
|
59
|
-
reason: {}
|
|
60
|
+
reason: {},
|
|
61
|
+
from: {}
|
|
60
62
|
},
|
|
61
|
-
setup(
|
|
62
|
-
const u =
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
setup(T) {
|
|
64
|
+
const u = T;
|
|
65
|
+
z(() => {
|
|
66
|
+
$();
|
|
65
67
|
});
|
|
66
|
-
const
|
|
68
|
+
const m = se(), { t: a } = te(), { setLoading: c } = ee(), y = f(!1), b = f(!1), v = f(!1), x = f([]), h = f(), n = f(
|
|
69
|
+
[]
|
|
70
|
+
), p = W(
|
|
67
71
|
/* @__PURE__ */ new Map()
|
|
68
|
-
),
|
|
72
|
+
), k = [
|
|
69
73
|
{
|
|
70
74
|
field: "assetImageSmall",
|
|
71
75
|
header: "Photo",
|
|
@@ -73,10 +77,10 @@ const Y = {
|
|
|
73
77
|
fixed: !0,
|
|
74
78
|
sortable: !1,
|
|
75
79
|
excluded: !0,
|
|
76
|
-
bodyComponent: (
|
|
77
|
-
component:
|
|
80
|
+
bodyComponent: (s) => ({
|
|
81
|
+
component: ne,
|
|
78
82
|
props: {
|
|
79
|
-
src:
|
|
83
|
+
src: s.assetImage,
|
|
80
84
|
description: "asset-report-photo",
|
|
81
85
|
size: "small"
|
|
82
86
|
}
|
|
@@ -87,22 +91,28 @@ const Y = {
|
|
|
87
91
|
field: "name.nameWithSequence",
|
|
88
92
|
sortable: !0,
|
|
89
93
|
fixed: !0,
|
|
90
|
-
bodyTemplate: (
|
|
94
|
+
bodyTemplate: (s) => {
|
|
91
95
|
var e;
|
|
92
|
-
return ((e =
|
|
96
|
+
return ((e = s.name) == null ? void 0 : e.nameWithSequence) ?? "-";
|
|
93
97
|
}
|
|
94
98
|
},
|
|
99
|
+
{
|
|
100
|
+
header: "Asset ID",
|
|
101
|
+
field: "assetId",
|
|
102
|
+
sortable: !0,
|
|
103
|
+
fixed: !0
|
|
104
|
+
},
|
|
95
105
|
{
|
|
96
106
|
header: "Brand",
|
|
97
107
|
field: "brand.name",
|
|
98
108
|
sortable: !0,
|
|
99
109
|
fixed: !1,
|
|
100
|
-
bodyComponent: (
|
|
110
|
+
bodyComponent: (s) => {
|
|
101
111
|
var e;
|
|
102
112
|
return {
|
|
103
|
-
component:
|
|
113
|
+
component: D,
|
|
104
114
|
props: {
|
|
105
|
-
label: (e =
|
|
115
|
+
label: (e = s.brand) == null ? void 0 : e.name,
|
|
106
116
|
severity: "dark",
|
|
107
117
|
format: "nowrap"
|
|
108
118
|
}
|
|
@@ -114,12 +124,12 @@ const Y = {
|
|
|
114
124
|
field: "model.name",
|
|
115
125
|
sortable: !0,
|
|
116
126
|
fixed: !1,
|
|
117
|
-
bodyComponent: (
|
|
127
|
+
bodyComponent: (s) => {
|
|
118
128
|
var e;
|
|
119
129
|
return {
|
|
120
|
-
component:
|
|
130
|
+
component: D,
|
|
121
131
|
props: {
|
|
122
|
-
label: (e =
|
|
132
|
+
label: (e = s.model) == null ? void 0 : e.name,
|
|
123
133
|
severity: "dark",
|
|
124
134
|
format: "nowrap"
|
|
125
135
|
}
|
|
@@ -131,12 +141,12 @@ const Y = {
|
|
|
131
141
|
field: "group.name",
|
|
132
142
|
sortable: !0,
|
|
133
143
|
fixed: !1,
|
|
134
|
-
bodyComponent: (
|
|
144
|
+
bodyComponent: (s) => {
|
|
135
145
|
var e;
|
|
136
146
|
return {
|
|
137
|
-
component:
|
|
147
|
+
component: D,
|
|
138
148
|
props: {
|
|
139
|
-
label: (e =
|
|
149
|
+
label: (e = s.group) == null ? void 0 : e.name,
|
|
140
150
|
format: "nowrap"
|
|
141
151
|
}
|
|
142
152
|
};
|
|
@@ -146,125 +156,227 @@ const Y = {
|
|
|
146
156
|
header: "Note",
|
|
147
157
|
field: "note",
|
|
148
158
|
fixed: !0,
|
|
149
|
-
bodyComponent: (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
bodyComponent: (s) => {
|
|
160
|
+
var e;
|
|
161
|
+
return {
|
|
162
|
+
component: le,
|
|
163
|
+
props: {
|
|
164
|
+
modelValue: (e = p.value.get(s._id ?? "assetId")) == null ? void 0 : e.notes,
|
|
165
|
+
placeholder: a("Enter note"),
|
|
166
|
+
rows: 1,
|
|
167
|
+
maxlength: 30
|
|
168
|
+
},
|
|
169
|
+
events: {
|
|
170
|
+
"update:modelValue": (t) => {
|
|
171
|
+
const o = p.value.get(s._id ?? "assetId");
|
|
172
|
+
p.value.set(s._id ?? "assetId", {
|
|
173
|
+
...o,
|
|
174
|
+
notes: t
|
|
175
|
+
}), s.note = t;
|
|
176
|
+
}
|
|
164
177
|
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
], $ = async () => {
|
|
182
|
+
const s = sessionStorage.getItem("assetsDisposalReport");
|
|
183
|
+
if (!s) {
|
|
184
|
+
m.add({
|
|
185
|
+
message: a("Error, no assets found for disposal report."),
|
|
186
|
+
severity: "error"
|
|
187
|
+
});
|
|
188
|
+
return;
|
|
167
189
|
}
|
|
168
|
-
], S = async () => {
|
|
169
190
|
try {
|
|
170
|
-
|
|
171
|
-
const
|
|
191
|
+
c(!0);
|
|
192
|
+
const { data: e } = await Y.getAllAssets({ _id: s });
|
|
172
193
|
e.data.data.forEach((t) => {
|
|
173
|
-
|
|
194
|
+
p.value.set(t._id ?? "", {
|
|
174
195
|
notes: null,
|
|
175
196
|
reason: ["Damaged", "Missing"].includes(t.status) ? t.status : u.reason
|
|
176
197
|
});
|
|
177
|
-
}),
|
|
178
|
-
} catch (
|
|
179
|
-
console.error(
|
|
180
|
-
error:
|
|
198
|
+
}), n.value = e.data.data;
|
|
199
|
+
} catch (e) {
|
|
200
|
+
console.error(e), m.add({
|
|
201
|
+
error: e,
|
|
181
202
|
message: "Error, failed to get assets. "
|
|
182
203
|
});
|
|
183
204
|
} finally {
|
|
184
|
-
|
|
205
|
+
c(!1);
|
|
185
206
|
}
|
|
186
|
-
},
|
|
207
|
+
}, N = [
|
|
187
208
|
{
|
|
188
|
-
label:
|
|
209
|
+
label: a("Remove from List"),
|
|
189
210
|
icon: "delete-bin",
|
|
190
211
|
danger: !0,
|
|
191
212
|
command: () => {
|
|
192
|
-
|
|
213
|
+
b.value = !0;
|
|
193
214
|
}
|
|
194
215
|
}
|
|
195
|
-
],
|
|
196
|
-
|
|
197
|
-
(e) => !
|
|
198
|
-
),
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}),
|
|
203
|
-
message:
|
|
216
|
+
], R = (s) => {
|
|
217
|
+
n.value = n.value.filter(
|
|
218
|
+
(e) => !s.some((t) => e._id === t._id)
|
|
219
|
+
), E(s);
|
|
220
|
+
}, E = (s) => {
|
|
221
|
+
s.forEach((e) => {
|
|
222
|
+
p.value.delete(e._id ?? "");
|
|
223
|
+
}), n.value.length || _(), m.add({
|
|
224
|
+
message: a("Success, asset has been removed from the list."),
|
|
204
225
|
severity: "success"
|
|
205
226
|
});
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
227
|
+
}, P = (s, e) => {
|
|
228
|
+
s.forEach((t) => {
|
|
229
|
+
p.value.set(t._id ?? "", {
|
|
209
230
|
notes: e ?? null,
|
|
210
231
|
reason: ["Damaged", "Missing"].includes(t.status) ? t.status : u.reason
|
|
211
232
|
});
|
|
212
233
|
});
|
|
213
|
-
},
|
|
214
|
-
const
|
|
234
|
+
}, _ = () => {
|
|
235
|
+
const s = window.location.pathname, e = s.slice(0, s.lastIndexOf("/"));
|
|
215
236
|
u.router.replace(e), sessionStorage.removeItem("assetsDisposalReport");
|
|
216
|
-
},
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const
|
|
237
|
+
}, F = async () => {
|
|
238
|
+
const s = [];
|
|
239
|
+
p.value.forEach((e, t) => {
|
|
240
|
+
const o = {
|
|
220
241
|
asset: t,
|
|
221
242
|
notes: e.notes,
|
|
222
243
|
reason: e.reason
|
|
223
244
|
};
|
|
224
|
-
|
|
245
|
+
s.push(o);
|
|
225
246
|
});
|
|
226
247
|
try {
|
|
227
|
-
|
|
228
|
-
message:
|
|
229
|
-
}),
|
|
248
|
+
c(!0), await Z.postReportDisposal({ data: s }), m.add({
|
|
249
|
+
message: a("Success, disposal report has been submitted.")
|
|
250
|
+
}), _();
|
|
251
|
+
} catch (e) {
|
|
252
|
+
console.error(e), m.add({
|
|
253
|
+
error: e,
|
|
254
|
+
message: a("Error, failed to submit disposal report.")
|
|
255
|
+
});
|
|
256
|
+
} finally {
|
|
257
|
+
c(!1);
|
|
258
|
+
}
|
|
259
|
+
}, L = async (s) => {
|
|
260
|
+
try {
|
|
261
|
+
c(!0);
|
|
262
|
+
const e = s.map((t) => {
|
|
263
|
+
var o, r, i, I, S, A;
|
|
264
|
+
return p.value.set(t.asset ?? "", {
|
|
265
|
+
notes: null,
|
|
266
|
+
reason: ["Damaged", "Missing"].includes(t.status) ? t.status : u.reason
|
|
267
|
+
}), {
|
|
268
|
+
...t,
|
|
269
|
+
reportId: t._id,
|
|
270
|
+
_id: t.asset,
|
|
271
|
+
name: t.assetName,
|
|
272
|
+
assetImage: t.assetImage ?? t.damageImage,
|
|
273
|
+
brand: t.assetBrand,
|
|
274
|
+
model: t.assetModel,
|
|
275
|
+
rfid: !1,
|
|
276
|
+
qr: !1,
|
|
277
|
+
transactions: null,
|
|
278
|
+
manager: null,
|
|
279
|
+
licenseStatuses: null,
|
|
280
|
+
category: {
|
|
281
|
+
_id: (o = t.category) == null ? void 0 : o._id,
|
|
282
|
+
name: (r = t.category) == null ? void 0 : r.name,
|
|
283
|
+
key: (i = t.category) == null ? void 0 : i.key
|
|
284
|
+
},
|
|
285
|
+
group: {
|
|
286
|
+
_id: (I = t.assetGroup) == null ? void 0 : I._id,
|
|
287
|
+
name: (S = t.assetGroup) == null ? void 0 : S.name,
|
|
288
|
+
key: (A = t.assetGroup) == null ? void 0 : A.key
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
});
|
|
292
|
+
n.value = n.value.concat(e);
|
|
230
293
|
} catch (e) {
|
|
231
|
-
console.error(e),
|
|
294
|
+
console.error(e), m.add({
|
|
232
295
|
error: e,
|
|
233
|
-
message:
|
|
296
|
+
message: "Error, failed to add asset.",
|
|
297
|
+
severity: "error"
|
|
234
298
|
});
|
|
235
299
|
} finally {
|
|
236
|
-
|
|
300
|
+
c(!1);
|
|
237
301
|
}
|
|
302
|
+
}, q = async (s) => {
|
|
303
|
+
var r;
|
|
304
|
+
const e = JSON.stringify(
|
|
305
|
+
((r = n.value) == null ? void 0 : r.map((i) => i.reportId)) ?? []
|
|
306
|
+
), t = {
|
|
307
|
+
excludeId: e,
|
|
308
|
+
excludeIds: e,
|
|
309
|
+
status: '["Damaged", "Reported Disposal", "On Disposal Process"]',
|
|
310
|
+
...s
|
|
311
|
+
}, { data: o } = await B.getDamageReportList(t);
|
|
312
|
+
return o;
|
|
313
|
+
}, U = async (s) => {
|
|
314
|
+
var r;
|
|
315
|
+
const e = JSON.stringify(
|
|
316
|
+
((r = n.value) == null ? void 0 : r.map((i) => i.reportId)) ?? []
|
|
317
|
+
), t = {
|
|
318
|
+
excludeId: e,
|
|
319
|
+
excludeIds: e,
|
|
320
|
+
status: '["Missing", "Reported Disposal", "On Disposal Process"]',
|
|
321
|
+
...s
|
|
322
|
+
}, { data: o } = await O.getData(t);
|
|
323
|
+
return o;
|
|
324
|
+
}, G = async (s) => {
|
|
325
|
+
var r;
|
|
326
|
+
const e = JSON.stringify(
|
|
327
|
+
((r = n.value) == null ? void 0 : r.map((i) => i.reportId)) ?? []
|
|
328
|
+
), t = {
|
|
329
|
+
excludeId: e,
|
|
330
|
+
excludeIds: e,
|
|
331
|
+
status: '["Missing", "Reported Disposal", "On Disposal Process"]',
|
|
332
|
+
reportedByOptions: "true",
|
|
333
|
+
[s]: !0
|
|
334
|
+
}, { data: o } = await O.getDataOptions(t);
|
|
335
|
+
return o.data[s] ?? [];
|
|
336
|
+
}, J = async (s) => {
|
|
337
|
+
var r;
|
|
338
|
+
const e = JSON.stringify(
|
|
339
|
+
((r = n.value) == null ? void 0 : r.map((i) => i.reportId)) ?? []
|
|
340
|
+
), t = {
|
|
341
|
+
excludeId: e,
|
|
342
|
+
excludeIds: e,
|
|
343
|
+
status: '["Missing", "Reported Disposal", "On Disposal Process"]',
|
|
344
|
+
reportedByOptions: "true",
|
|
345
|
+
[s]: !0
|
|
346
|
+
}, { data: o } = await B.getDamageReportListFilterOptions(t);
|
|
347
|
+
return o.data[s] ?? [];
|
|
238
348
|
};
|
|
239
|
-
return (
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"assets-to-report":
|
|
244
|
-
"onUpdate:assetsToReport": e[0] || (e[0] = (t) =>
|
|
245
|
-
"selected-data":
|
|
246
|
-
"onUpdate:selectedData": e[1] || (e[1] = (t) =>
|
|
247
|
-
onNoted:
|
|
248
|
-
onRemoved: e[2] || (e[2] = (t) =>
|
|
349
|
+
return (s, e) => (H(), j(K, null, [
|
|
350
|
+
g("div", ue, [
|
|
351
|
+
g("div", me, [
|
|
352
|
+
l(ie, {
|
|
353
|
+
"assets-to-report": n.value,
|
|
354
|
+
"onUpdate:assetsToReport": e[0] || (e[0] = (t) => n.value = t),
|
|
355
|
+
"selected-data": x.value,
|
|
356
|
+
"onUpdate:selectedData": e[1] || (e[1] = (t) => x.value = t),
|
|
357
|
+
onNoted: P,
|
|
358
|
+
onRemoved: e[2] || (e[2] = (t) => R(t)),
|
|
249
359
|
"table-name": "disposal-report-page-table"
|
|
250
360
|
}, null, 8, ["assets-to-report", "selected-data"]),
|
|
251
|
-
|
|
361
|
+
l(oe, {
|
|
252
362
|
class: "ml-auto",
|
|
253
363
|
"table-name": "disposal-report-page-table"
|
|
254
364
|
}),
|
|
255
|
-
|
|
365
|
+
l(ae, { "table-name": "disposal-report-page-table" }),
|
|
366
|
+
l(w, {
|
|
367
|
+
onClick: e[3] || (e[3] = (t) => y.value = !0),
|
|
368
|
+
icon: "add",
|
|
369
|
+
label: "Asset"
|
|
370
|
+
})
|
|
256
371
|
]),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
a(K, P(o.$props, {
|
|
262
|
-
columns: C,
|
|
263
|
-
data: r.value,
|
|
372
|
+
l(pe, { "table-name": "disposal-report-page-table" }),
|
|
373
|
+
l(re, Q(s.$props, {
|
|
374
|
+
columns: k,
|
|
375
|
+
data: n.value,
|
|
264
376
|
lazy: !1,
|
|
265
|
-
options:
|
|
377
|
+
options: N,
|
|
266
378
|
rows: 10,
|
|
267
|
-
onToggleOption: e[
|
|
379
|
+
onToggleOption: e[4] || (e[4] = (t) => h.value = t),
|
|
268
380
|
"data-key": "_id",
|
|
269
381
|
"rounded-header": "",
|
|
270
382
|
"selection-type": "checkbox",
|
|
@@ -273,41 +385,48 @@ const Y = {
|
|
|
273
385
|
"use-paginator": ""
|
|
274
386
|
}), null, 16, ["data"])
|
|
275
387
|
]),
|
|
276
|
-
|
|
277
|
-
visible:
|
|
278
|
-
"onUpdate:visible": e[
|
|
279
|
-
|
|
280
|
-
"
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
388
|
+
l(de, {
|
|
389
|
+
visible: y.value,
|
|
390
|
+
"onUpdate:visible": e[5] || (e[5] = (t) => y.value = t),
|
|
391
|
+
"fetch-function": u.from === "damage" ? q : U,
|
|
392
|
+
"fetch-option-function": u.from === "damage" ? J : G,
|
|
393
|
+
onSelect: L
|
|
394
|
+
}, null, 8, ["visible", "fetch-function", "fetch-option-function"]),
|
|
395
|
+
l(M, {
|
|
396
|
+
visible: b.value,
|
|
397
|
+
"onUpdate:visible": e[6] || (e[6] = (t) => b.value = t),
|
|
398
|
+
body: d(a)("Are you sure you want to remove it?"),
|
|
399
|
+
"confirm-label": d(a)("Remove"),
|
|
400
|
+
header: d(a)("Remove from List"),
|
|
401
|
+
lists: [h.value],
|
|
402
|
+
onConfirm: e[7] || (e[7] = (t) => R([h.value])),
|
|
284
403
|
"list-label": "name.nameWithSequence",
|
|
285
404
|
severity: "danger"
|
|
286
405
|
}, null, 8, ["visible", "body", "confirm-label", "header", "lists"]),
|
|
287
|
-
|
|
288
|
-
visible:
|
|
289
|
-
"onUpdate:visible": e[
|
|
290
|
-
"confirm-label":
|
|
291
|
-
header:
|
|
292
|
-
onConfirm:
|
|
406
|
+
l(M, {
|
|
407
|
+
visible: v.value,
|
|
408
|
+
"onUpdate:visible": e[8] || (e[8] = (t) => v.value = t),
|
|
409
|
+
"confirm-label": d(a)("Continue"),
|
|
410
|
+
header: d(a)("Cancel Report"),
|
|
411
|
+
onConfirm: _,
|
|
293
412
|
severity: "danger"
|
|
294
413
|
}, {
|
|
295
|
-
body:
|
|
296
|
-
|
|
297
|
-
|
|
414
|
+
body: X(() => [
|
|
415
|
+
g("p", null, C(d(a)("This action will cancel the disposal report.")), 1),
|
|
416
|
+
g("p", null, C(d(a)("Are you sure you want to continue?")), 1)
|
|
298
417
|
]),
|
|
299
418
|
_: 1
|
|
300
419
|
}, 8, ["visible", "confirm-label", "header"]),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
label:
|
|
304
|
-
onClick: e[
|
|
420
|
+
g("div", ce, [
|
|
421
|
+
l(w, {
|
|
422
|
+
label: d(a)("Cancel"),
|
|
423
|
+
onClick: e[9] || (e[9] = (t) => v.value = !0),
|
|
305
424
|
severity: "dark",
|
|
306
425
|
text: ""
|
|
307
426
|
}, null, 8, ["label"]),
|
|
308
|
-
|
|
309
|
-
label:
|
|
310
|
-
onClick:
|
|
427
|
+
l(w, {
|
|
428
|
+
label: d(a)("Submit"),
|
|
429
|
+
onClick: F,
|
|
311
430
|
severity: "success"
|
|
312
431
|
}, null, 8, ["label"])
|
|
313
432
|
])
|
|
@@ -315,5 +434,5 @@ const Y = {
|
|
|
315
434
|
}
|
|
316
435
|
});
|
|
317
436
|
export {
|
|
318
|
-
|
|
437
|
+
Me as _
|
|
319
438
|
};
|
|
@@ -1,68 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { u as k } from "../utils/toast.util.es.js";
|
|
6
|
-
import { _ as v } from "../filtercontainer/index.es.js";
|
|
7
|
-
const x = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as t, shallowRef as o, createBlock as p, openBlock as r } from "vue";
|
|
2
|
+
import { u as s } from "../plugins/basei18n.es.js";
|
|
3
|
+
import { _ as m } from "../filtercontainer/index.es.js";
|
|
4
|
+
const u = /* @__PURE__ */ t({
|
|
8
5
|
__name: "DisposalReportTableFilter",
|
|
9
6
|
props: {
|
|
10
|
-
assets: {},
|
|
11
7
|
tableName: {}
|
|
12
8
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
9
|
+
setup(n) {
|
|
10
|
+
const { t: e } = s(), l = o([
|
|
15
11
|
{
|
|
16
12
|
label: e("Name"),
|
|
17
13
|
placeholder: e("Select asset name"),
|
|
18
|
-
field: "name.
|
|
19
|
-
type: "multiselect"
|
|
20
|
-
fetchOptionFn: async () => s("nameOptions")
|
|
14
|
+
field: "name.name",
|
|
15
|
+
type: "multiselect"
|
|
21
16
|
},
|
|
22
17
|
{
|
|
23
18
|
label: e("Brand"),
|
|
24
19
|
placeholder: e("Select brand"),
|
|
25
|
-
field: "brand.
|
|
26
|
-
type: "multiselect"
|
|
27
|
-
fetchOptionFn: async () => s("brandOptions")
|
|
20
|
+
field: "brand.name",
|
|
21
|
+
type: "multiselect"
|
|
28
22
|
},
|
|
29
23
|
{
|
|
30
24
|
label: e("Model/Type"),
|
|
31
25
|
placeholder: e("Select model/type"),
|
|
32
|
-
field: "model.
|
|
33
|
-
type: "multiselect"
|
|
34
|
-
fetchOptionFn: async () => s("modelOptions")
|
|
26
|
+
field: "model.name",
|
|
27
|
+
type: "multiselect"
|
|
35
28
|
},
|
|
36
29
|
{
|
|
37
30
|
label: e("Group"),
|
|
38
31
|
field: "group.key",
|
|
39
32
|
type: "group"
|
|
40
33
|
}
|
|
41
|
-
])
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
n.value[t] = !0;
|
|
47
|
-
const a = o.assets.map((u) => u._id ?? "");
|
|
48
|
-
m.value = a.length;
|
|
49
|
-
const d = {
|
|
50
|
-
_id: JSON.stringify(a),
|
|
51
|
-
[t]: !0
|
|
52
|
-
}, { data: f } = await _.getAllAssetsOptions(d);
|
|
53
|
-
return (l = f.data) == null ? void 0 : l[t];
|
|
54
|
-
} catch (a) {
|
|
55
|
-
return console.error(a), c.add({
|
|
56
|
-
error: a,
|
|
57
|
-
message: "Error, failed to get filter option."
|
|
58
|
-
}), [];
|
|
59
|
-
} finally {
|
|
60
|
-
n.value[t] = !1;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return (t, l) => (h(), b(v, {
|
|
64
|
-
fields: i.value,
|
|
65
|
-
"table-name": t.tableName,
|
|
34
|
+
]);
|
|
35
|
+
return (a, c) => (r(), p(m, {
|
|
36
|
+
fields: l.value,
|
|
37
|
+
"table-name": a.tableName,
|
|
66
38
|
class: "!gap-x-3 !gap-y-4 !p-3",
|
|
67
39
|
"data-ts-name": "diposalreportfilter",
|
|
68
40
|
static: ""
|
|
@@ -70,5 +42,5 @@ const x = /* @__PURE__ */ y({
|
|
|
70
42
|
}
|
|
71
43
|
});
|
|
72
44
|
export {
|
|
73
|
-
|
|
45
|
+
u as _
|
|
74
46
|
};
|
package/icon/index.d.ts
CHANGED