@acorex/modules 20.7.20 → 20.7.21
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/asset-management/index.d.ts +24 -33
- package/dashboard-management/index.d.ts +40 -5
- package/document-management/index.d.ts +1 -26
- package/fesm2022/acorex-modules-asset-management-asset.entity-D_w4zjNb.mjs +612 -0
- package/fesm2022/acorex-modules-asset-management-asset.entity-D_w4zjNb.mjs.map +1 -0
- package/fesm2022/acorex-modules-asset-management-manual-asset-category.entity-DyIV_vbE.mjs +267 -0
- package/fesm2022/acorex-modules-asset-management-manual-asset-category.entity-DyIV_vbE.mjs.map +1 -0
- package/fesm2022/acorex-modules-asset-management.mjs +59 -117
- package/fesm2022/acorex-modules-asset-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +454 -116
- package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +4 -2
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +40 -99
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-maintenance-management.mjs +194 -103
- package/fesm2022/acorex-modules-maintenance-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +21 -6
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-reservation-management-acorex-modules-reservation-management-CkHGIQ38.mjs +2135 -0
- package/fesm2022/acorex-modules-reservation-management-acorex-modules-reservation-management-CkHGIQ38.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-class-status.entity-Clyj7r2x.mjs +263 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-class-status.entity-Clyj7r2x.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-resource-type.entity-BXb0FTQ5.mjs +184 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-resource-type.entity-BXb0FTQ5.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-status-transition.entity-BT8GQ9MC.mjs +247 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-status-transition.entity-BT8GQ9MC.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management.mjs +1 -3325
- package/fesm2022/acorex-modules-reservation-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-BOOY3qla.mjs → acorex-modules-task-management-task-board.page-BBKB4yir.mjs} +114 -62
- package/fesm2022/acorex-modules-task-management-task-board.page-BBKB4yir.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +43 -13
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/maintenance-management/index.d.ts +7 -3
- package/package.json +2 -2
- package/reservation-management/index.d.ts +84 -338
- package/fesm2022/acorex-modules-asset-management-asset.entity-C57iN3Bo.mjs +0 -357
- package/fesm2022/acorex-modules-asset-management-asset.entity-C57iN3Bo.mjs.map +0 -1
- package/fesm2022/acorex-modules-asset-management-inspection.entity-CpDuN-qj.mjs +0 -198
- package/fesm2022/acorex-modules-asset-management-inspection.entity-CpDuN-qj.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-BOOY3qla.mjs.map +0 -1
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
import { createAllQueryView, AXPEntityCommandScope } from '@acorex/platform/common';
|
|
2
|
+
import { AXPSystemActionType } from '@acorex/platform/core';
|
|
3
|
+
import { AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, entityDetailsCrudActions, entityDetailsSimpleCondition } from '@acorex/platform/layout/entity';
|
|
4
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
5
|
+
import { runInInjectionContext } from '@angular/core';
|
|
6
|
+
import { RootConfig } from './acorex-modules-asset-management.mjs';
|
|
7
|
+
import { RootConfig as RootConfig$2 } from '@acorex/modules/maintenance-management';
|
|
8
|
+
import { RootConfig as RootConfig$1 } from '@acorex/modules/assessment-management';
|
|
9
|
+
import { AXPWidgetsList } from '@acorex/modules/common';
|
|
10
|
+
|
|
11
|
+
//#region ---- Imports ----
|
|
12
|
+
//#endregion
|
|
13
|
+
async function factory(injector) {
|
|
14
|
+
//#region ---- Services & Data Enrichment ----
|
|
15
|
+
/** Asset data service */
|
|
16
|
+
const assetFullKey = `${RootConfig.module.name}.${RootConfig.entities.asset.name}`;
|
|
17
|
+
const assetService = runInInjectionContext(injector, () => new AXMEntityCrudServiceImpl(assetFullKey));
|
|
18
|
+
/** Category data service for looking up ManualAssetCategory records */
|
|
19
|
+
const categoryFullKey = `${RootConfig.module.name}.${RootConfig.entities.manualAssetCategory.name}`;
|
|
20
|
+
const categoryService = runInInjectionContext(injector, () => new AXMEntityCrudServiceImpl(categoryFullKey));
|
|
21
|
+
/**
|
|
22
|
+
* Loads all ManualAssetCategory records (cached for reuse).
|
|
23
|
+
*/
|
|
24
|
+
let allCategoriesCache = null;
|
|
25
|
+
const loadAllCategories = async () => {
|
|
26
|
+
if (allCategoriesCache)
|
|
27
|
+
return allCategoriesCache;
|
|
28
|
+
const result = await categoryService.query({ skip: 0, take: 1000 });
|
|
29
|
+
allCategoriesCache = result.items ?? [];
|
|
30
|
+
return allCategoriesCache;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
const entityDef = {
|
|
34
|
+
module: RootConfig.module.name,
|
|
35
|
+
name: RootConfig.entities.asset.name,
|
|
36
|
+
title: RootConfig.entities.asset.title,
|
|
37
|
+
icon: RootConfig.entities.asset.icon,
|
|
38
|
+
parentKey: 'parentId',
|
|
39
|
+
plugins: [
|
|
40
|
+
{ name: 'history' },
|
|
41
|
+
{ name: 'compare' },
|
|
42
|
+
{ name: 'unique-fields', options: { fields: 'code', scope: 'global' } },
|
|
43
|
+
{ name: 'notes', options: { order: 1 } },
|
|
44
|
+
{ name: 'category', options: { categoryEntity: `AssetManagement.ManualAssetCategory`, order: 2 } },
|
|
45
|
+
{
|
|
46
|
+
name: 'meta-data-form',
|
|
47
|
+
options: {
|
|
48
|
+
path: 'categoryIds',
|
|
49
|
+
title: '@asset-management:assets.entities.asset.components.meta-data-form.title',
|
|
50
|
+
order: 3
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'status',
|
|
55
|
+
options: {
|
|
56
|
+
field: 'statusId',
|
|
57
|
+
definition: 'asset-management.status.asset',
|
|
58
|
+
order: 4
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{ name: 'tags' },
|
|
62
|
+
{ name: 'attachments' },
|
|
63
|
+
],
|
|
64
|
+
relatedEntities: [
|
|
65
|
+
{
|
|
66
|
+
entity: `${RootConfig$2.module.name}.${RootConfig$2.entities.maintenance.name}`,
|
|
67
|
+
title: '@asset-management:assets.entities.asset.related-entities.maintenances.title',
|
|
68
|
+
icon: RootConfig$2.entities.maintenance.icon,
|
|
69
|
+
hidden: '{{ !context.eval("hasMaintenance") }}',
|
|
70
|
+
conditions: [entityDetailsSimpleCondition('resourceId')],
|
|
71
|
+
actions: [
|
|
72
|
+
// Custom create action that passes resourceId AND resource data (including availableMaintenanceTypeIds)
|
|
73
|
+
{
|
|
74
|
+
title: '@general:actions.create.title',
|
|
75
|
+
command: {
|
|
76
|
+
name: 'Entity:Create',
|
|
77
|
+
options: {
|
|
78
|
+
process: {
|
|
79
|
+
redirect: false,
|
|
80
|
+
canCreateNewOne: true,
|
|
81
|
+
data: {
|
|
82
|
+
resourceId: '{{context.eval("id")}}',
|
|
83
|
+
resource: {
|
|
84
|
+
id: '{{context.eval("id")}}',
|
|
85
|
+
title: '{{context.eval("title")}}',
|
|
86
|
+
code: '{{context.eval("code")}}',
|
|
87
|
+
availableMaintenanceTypeIds: '{{context.eval("availableMaintenanceTypeIds")}}',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
priority: 'primary',
|
|
94
|
+
type: AXPSystemActionType.Create,
|
|
95
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
96
|
+
},
|
|
97
|
+
// Keep edit, view actions from standard helpers
|
|
98
|
+
...entityDetailsCrudActions('resourceId', { create: false }),
|
|
99
|
+
],
|
|
100
|
+
layout: { type: 'page-list', position: 'after', order: 1 },
|
|
101
|
+
},
|
|
102
|
+
// {
|
|
103
|
+
// entity: `${RootConfig.module.name}.${RootConfig.entities.inspection.name}`,
|
|
104
|
+
// title: '@asset-management:assets.entities.asset.related-entities.inspections.title',
|
|
105
|
+
// icon: RootConfig.entities.inspection.icon,
|
|
106
|
+
// conditions: [entityDetailsSimpleCondition('assetId')],
|
|
107
|
+
// actions: [...entityDetailsCrudActions('assetId')],
|
|
108
|
+
// layout: { type: 'page-list', position: 'after', order: 2 },
|
|
109
|
+
// },
|
|
110
|
+
],
|
|
111
|
+
formats: {
|
|
112
|
+
individual: RootConfig.entities.asset.title,
|
|
113
|
+
plural: RootConfig.entities.asset.titlePlural,
|
|
114
|
+
searchResult: { title: '{{ title }}' },
|
|
115
|
+
displayName: '@asset-management:assets.entities.asset.title',
|
|
116
|
+
},
|
|
117
|
+
groups: [
|
|
118
|
+
{ id: 'basic-info', title: '@asset-management:assets.entities.asset.groups.basic-info' },
|
|
119
|
+
{ id: 'category-info', title: '@asset-management:assets.entities.asset.groups.category-info' },
|
|
120
|
+
{ id: 'ownership', title: '@asset-management:assets.entities.asset.groups.ownership' },
|
|
121
|
+
{ id: 'placement', title: '@asset-management:assets.entities.asset.groups.placement' },
|
|
122
|
+
{ id: 'lifecycle', title: '@asset-management:assets.entities.asset.groups.lifecycle' },
|
|
123
|
+
{ id: 'booking', title: '@asset-management:assets.entities.asset.groups.booking' },
|
|
124
|
+
{ id: 'media', title: '@asset-management:assets.entities.asset.groups.media' },
|
|
125
|
+
],
|
|
126
|
+
properties: [
|
|
127
|
+
{
|
|
128
|
+
name: 'id',
|
|
129
|
+
title: 'ID',
|
|
130
|
+
schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'code',
|
|
134
|
+
title: '@asset-management:assets.entities.asset.fields.code.title',
|
|
135
|
+
groupId: 'basic-info',
|
|
136
|
+
schema: {
|
|
137
|
+
dataType: 'string',
|
|
138
|
+
unique: { enabled: true },
|
|
139
|
+
interface: {
|
|
140
|
+
type: AXPWidgetsCatalog.text,
|
|
141
|
+
options: {
|
|
142
|
+
placeholder: '@asset-management:assets.entities.asset.fields.code.placeholder',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
options: {
|
|
147
|
+
sort: { enabled: true },
|
|
148
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
149
|
+
},
|
|
150
|
+
validations: [{ rule: 'required' }],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'title',
|
|
154
|
+
title: '@asset-management:assets.entities.asset.fields.title.title',
|
|
155
|
+
groupId: 'basic-info',
|
|
156
|
+
schema: {
|
|
157
|
+
dataType: 'string',
|
|
158
|
+
interface: {
|
|
159
|
+
type: AXPWidgetsCatalog.text,
|
|
160
|
+
options: {
|
|
161
|
+
placeholder: '@asset-management:assets.entities.asset.fields.title.placeholder',
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
options: {
|
|
166
|
+
sort: { enabled: true },
|
|
167
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
168
|
+
},
|
|
169
|
+
validations: [{ rule: 'required' }],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'serialNumber',
|
|
173
|
+
title: '@asset-management:assets.entities.asset.fields.serial-number.title',
|
|
174
|
+
groupId: 'basic-info',
|
|
175
|
+
schema: {
|
|
176
|
+
dataType: 'string',
|
|
177
|
+
interface: {
|
|
178
|
+
type: AXPWidgetsCatalog.text,
|
|
179
|
+
options: {
|
|
180
|
+
placeholder: '@asset-management:assets.entities.asset.fields.serial-number.placeholder',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
validations: [{ rule: 'required' }],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'testTagIdentificationNumber',
|
|
188
|
+
title: '@asset-management:assets.entities.asset.fields.test-tag-identification-number.title',
|
|
189
|
+
groupId: 'basic-info',
|
|
190
|
+
schema: {
|
|
191
|
+
dataType: 'string',
|
|
192
|
+
interface: {
|
|
193
|
+
type: AXPWidgetsCatalog.text,
|
|
194
|
+
options: {
|
|
195
|
+
placeholder: '@asset-management:assets.entities.asset.fields.test-tag-identification-number.placeholder',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'qrCode',
|
|
202
|
+
title: '@asset-management:assets.entities.asset.fields.qr-code.title',
|
|
203
|
+
groupId: 'basic-info',
|
|
204
|
+
schema: {
|
|
205
|
+
dataType: 'string',
|
|
206
|
+
interface: {
|
|
207
|
+
type: AXPWidgetsCatalog.qrcode,
|
|
208
|
+
options: {
|
|
209
|
+
size: 200,
|
|
210
|
+
outputType: 'svg',
|
|
211
|
+
readonly: true,
|
|
212
|
+
},
|
|
213
|
+
triggers: [
|
|
214
|
+
{
|
|
215
|
+
event: '{{ events.context("code") }}',
|
|
216
|
+
action: '{{ context.set("qrCode", context.eval("code")) }}',
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
// {
|
|
223
|
+
// name: 'description',
|
|
224
|
+
// title: '@asset-management:assets.entities.asset.fields.description.title',
|
|
225
|
+
// groupId: 'basic-info',
|
|
226
|
+
// schema: {
|
|
227
|
+
// dataType: 'string',
|
|
228
|
+
// interface: {
|
|
229
|
+
// type: AXPWidgetsCatalog.largeText,
|
|
230
|
+
// options: {
|
|
231
|
+
// rows: 4,
|
|
232
|
+
// placeholder: '@asset-management:assets.entities.asset.fields.description.placeholder',
|
|
233
|
+
// },
|
|
234
|
+
// },
|
|
235
|
+
// },
|
|
236
|
+
// options: {
|
|
237
|
+
// sort: { enabled: false },
|
|
238
|
+
// filter: { advance: { enabled: true }, inline: { enabled: false } },
|
|
239
|
+
// },
|
|
240
|
+
// },
|
|
241
|
+
{
|
|
242
|
+
name: 'isRented',
|
|
243
|
+
title: '@asset-management:assets.entities.asset.fields.is-rented.title',
|
|
244
|
+
groupId: 'basic-info',
|
|
245
|
+
schema: {
|
|
246
|
+
dataType: 'boolean',
|
|
247
|
+
interface: {
|
|
248
|
+
type: AXPWidgetsCatalog.toggle,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'ownerId',
|
|
254
|
+
title: '@asset-management:assets.entities.asset.fields.owner-id.title',
|
|
255
|
+
groupId: 'ownership',
|
|
256
|
+
schema: {
|
|
257
|
+
dataType: 'string',
|
|
258
|
+
interface: {
|
|
259
|
+
type: AXPWidgetsCatalog.lookup,
|
|
260
|
+
options: {
|
|
261
|
+
entity: 'HumanCapitalManagement.Employee',
|
|
262
|
+
textField: 'person.displayName',
|
|
263
|
+
valueField: 'id',
|
|
264
|
+
columns: ['person.displayName', 'employeeCode'],
|
|
265
|
+
expose: [
|
|
266
|
+
{ source: 'id', target: 'owner.id' },
|
|
267
|
+
{ source: 'person.displayName', target: 'owner.displayName' },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
options: {
|
|
273
|
+
sort: { enabled: true },
|
|
274
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: 'assignedToEmployeeId',
|
|
279
|
+
title: '@asset-management:assets.entities.asset.fields.assigned-to-employee-id.title',
|
|
280
|
+
groupId: 'ownership',
|
|
281
|
+
schema: {
|
|
282
|
+
dataType: 'string',
|
|
283
|
+
interface: {
|
|
284
|
+
type: AXPWidgetsCatalog.lookup,
|
|
285
|
+
options: {
|
|
286
|
+
entity: 'HumanCapitalManagement.Employee',
|
|
287
|
+
textField: 'person.displayName',
|
|
288
|
+
valueField: 'id',
|
|
289
|
+
columns: ['person.displayName', 'employeeCode'],
|
|
290
|
+
expose: [
|
|
291
|
+
{ source: 'id', target: 'assignedToEmployee.id' },
|
|
292
|
+
{ source: 'person.displayName', target: 'assignedToEmployee.displayName' },
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
options: {
|
|
298
|
+
sort: { enabled: true },
|
|
299
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: 'locationId',
|
|
304
|
+
title: '@asset-management:assets.entities.asset.fields.location-id.title',
|
|
305
|
+
groupId: 'placement',
|
|
306
|
+
schema: {
|
|
307
|
+
dataType: 'string',
|
|
308
|
+
interface: {
|
|
309
|
+
type: AXPWidgetsCatalog.lookup,
|
|
310
|
+
options: {
|
|
311
|
+
entity: 'LocationManagement.Location',
|
|
312
|
+
textField: 'title',
|
|
313
|
+
valueField: 'id',
|
|
314
|
+
expose: [
|
|
315
|
+
{ source: 'id', target: 'location.id' },
|
|
316
|
+
{ source: 'title', target: 'location.title' },
|
|
317
|
+
],
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
options: {
|
|
322
|
+
sort: { enabled: true },
|
|
323
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'parentId',
|
|
328
|
+
title: '@asset-management:assets.entities.asset.fields.parent-id.title',
|
|
329
|
+
groupId: 'placement',
|
|
330
|
+
schema: {
|
|
331
|
+
dataType: 'string',
|
|
332
|
+
interface: {
|
|
333
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
334
|
+
options: {
|
|
335
|
+
entity: `${RootConfig.module.name}.Asset`,
|
|
336
|
+
textField: 'title',
|
|
337
|
+
valueField: 'id',
|
|
338
|
+
expose: [
|
|
339
|
+
{ source: 'id', target: 'parent.id' },
|
|
340
|
+
{ source: 'title', target: 'parent.title' },
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: 'purchaseDate',
|
|
348
|
+
title: '@asset-management:assets.entities.asset.fields.purchase-date.title',
|
|
349
|
+
groupId: 'lifecycle',
|
|
350
|
+
schema: {
|
|
351
|
+
dataType: 'date',
|
|
352
|
+
interface: {
|
|
353
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
354
|
+
options: {
|
|
355
|
+
format: 'date',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
options: {
|
|
360
|
+
sort: { enabled: true },
|
|
361
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: 'commissionedDate',
|
|
366
|
+
title: '@asset-management:assets.entities.asset.fields.commissioned-date.title',
|
|
367
|
+
groupId: 'lifecycle',
|
|
368
|
+
schema: {
|
|
369
|
+
dataType: 'date',
|
|
370
|
+
interface: {
|
|
371
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
372
|
+
options: {
|
|
373
|
+
format: 'date',
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
options: {
|
|
378
|
+
sort: { enabled: true },
|
|
379
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: 'retiredDate',
|
|
384
|
+
title: '@asset-management:assets.entities.asset.fields.retired-date.title',
|
|
385
|
+
groupId: 'lifecycle',
|
|
386
|
+
schema: {
|
|
387
|
+
dataType: 'date',
|
|
388
|
+
interface: {
|
|
389
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
390
|
+
options: {
|
|
391
|
+
format: 'date',
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
options: {
|
|
396
|
+
sort: { enabled: true },
|
|
397
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: 'isBookable',
|
|
402
|
+
title: '@asset-management:assets.entities.asset.fields.is-bookable.title',
|
|
403
|
+
groupId: 'booking',
|
|
404
|
+
schema: {
|
|
405
|
+
dataType: 'boolean',
|
|
406
|
+
interface: {
|
|
407
|
+
type: AXPWidgetsCatalog.toggle,
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: 'preBookQuestionnaireId',
|
|
413
|
+
title: '@asset-management:assets.entities.asset.fields.pre-book-questionnaire-id.title',
|
|
414
|
+
groupId: 'booking',
|
|
415
|
+
schema: {
|
|
416
|
+
dataType: 'string',
|
|
417
|
+
visible: `{{ context.eval('isBookable') }}`,
|
|
418
|
+
interface: {
|
|
419
|
+
type: AXPWidgetsCatalog.lookup,
|
|
420
|
+
options: {
|
|
421
|
+
entity: `${RootConfig$1.module.name}.${RootConfig$1.entities.questionnaire.name}`,
|
|
422
|
+
textField: 'title',
|
|
423
|
+
valueField: 'id',
|
|
424
|
+
expose: [
|
|
425
|
+
{ source: 'id', target: 'preBookQuestionnaire.id' },
|
|
426
|
+
{ source: 'title', target: 'preBookQuestionnaire.title' },
|
|
427
|
+
],
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: 'postBookQuestionnaireId',
|
|
434
|
+
title: '@asset-management:assets.entities.asset.fields.post-book-questionnaire-id.title',
|
|
435
|
+
groupId: 'booking',
|
|
436
|
+
schema: {
|
|
437
|
+
dataType: 'string',
|
|
438
|
+
visible: `{{ context.eval('isBookable') }}`,
|
|
439
|
+
interface: {
|
|
440
|
+
type: AXPWidgetsCatalog.lookup,
|
|
441
|
+
options: {
|
|
442
|
+
entity: `${RootConfig$1.module.name}.${RootConfig$1.entities.questionnaire.name}`,
|
|
443
|
+
textField: 'title',
|
|
444
|
+
valueField: 'id',
|
|
445
|
+
expose: [
|
|
446
|
+
{ source: 'id', target: 'postBookQuestionnaire.id' },
|
|
447
|
+
{ source: 'title', target: 'postBookQuestionnaire.title' },
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: 'images',
|
|
455
|
+
title: '@asset-management:assets.entities.asset.fields.images.title',
|
|
456
|
+
groupId: 'media',
|
|
457
|
+
options: {
|
|
458
|
+
sort: { enabled: false },
|
|
459
|
+
filter: {
|
|
460
|
+
advance: { enabled: false },
|
|
461
|
+
inline: { enabled: false },
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
schema: {
|
|
465
|
+
dataType: 'array',
|
|
466
|
+
interface: {
|
|
467
|
+
type: AXPWidgetsCatalog.gallery,
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
name: 'availableMaintenanceTypeIds',
|
|
473
|
+
title: 'Available Maintenance Types',
|
|
474
|
+
groupId: 'category-info',
|
|
475
|
+
schema: { dataType: 'array', visible: false, readonly: true },
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: 'hasMaintenance',
|
|
479
|
+
title: 'Has Maintenance',
|
|
480
|
+
groupId: 'category-info',
|
|
481
|
+
schema: { dataType: 'boolean', visible: false, readonly: true },
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
columns: [
|
|
485
|
+
{ name: 'code' },
|
|
486
|
+
{ name: 'title' },
|
|
487
|
+
{ name: 'serialNumber' },
|
|
488
|
+
// { name: 'description' },
|
|
489
|
+
{ name: 'ownerId', options: { dataPath: 'owner.displayName' } },
|
|
490
|
+
{ name: 'assignedToEmployeeId', options: { dataPath: 'assignedToEmployee.displayName' } },
|
|
491
|
+
{ name: 'locationId', options: { dataPath: 'location.title' } },
|
|
492
|
+
{ name: 'statusId' },
|
|
493
|
+
{ name: 'purchaseDate' },
|
|
494
|
+
{ name: 'commissionedDate' },
|
|
495
|
+
{ name: 'retiredDate' },
|
|
496
|
+
{ name: 'isBookable' },
|
|
497
|
+
{ name: 'qrCode' },
|
|
498
|
+
],
|
|
499
|
+
queries: {},
|
|
500
|
+
interfaces: {
|
|
501
|
+
master: {
|
|
502
|
+
create: {
|
|
503
|
+
sections: [
|
|
504
|
+
{ id: 'basic-info', order: 1 },
|
|
505
|
+
{ id: 'category-info', order: 2 },
|
|
506
|
+
{ id: 'ownership', order: 3 },
|
|
507
|
+
{ id: 'placement', order: 4 },
|
|
508
|
+
{ id: 'lifecycle', order: 5 },
|
|
509
|
+
{ id: 'booking', order: 6 },
|
|
510
|
+
{ id: 'media', order: 7 },
|
|
511
|
+
],
|
|
512
|
+
properties: [
|
|
513
|
+
{ name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
|
|
514
|
+
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
515
|
+
{ name: 'serialNumber', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
516
|
+
{ name: 'testTagIdentificationNumber', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
517
|
+
{ name: 'isRented', layout: { positions: { lg: { colSpan: 12, order: 5 } } } },
|
|
518
|
+
{ name: 'ownerId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
519
|
+
{ name: 'assignedToEmployeeId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
520
|
+
{ name: 'parentId', layout: { positions: { lg: { colSpan: 6, order: 8 } } } },
|
|
521
|
+
{ name: 'locationId', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
|
|
522
|
+
{ name: 'purchaseDate', layout: { positions: { lg: { colSpan: 6, order: 10 } } } },
|
|
523
|
+
{ name: 'commissionedDate', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
|
|
524
|
+
{ name: 'retiredDate', layout: { positions: { lg: { colSpan: 6, order: 12 } } } },
|
|
525
|
+
{ name: 'isBookable', layout: { positions: { lg: { colSpan: 12, order: 13 } } } },
|
|
526
|
+
{ name: 'preBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 14 } } } },
|
|
527
|
+
{ name: 'postBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 15 } } } },
|
|
528
|
+
{
|
|
529
|
+
name: 'qrCode',
|
|
530
|
+
layout: { positions: { lg: { colSpan: 6, rowSpan: 4, order: 16 } } },
|
|
531
|
+
},
|
|
532
|
+
{ name: 'images', layout: { positions: { lg: { colSpan: 12, order: 17 } } } },
|
|
533
|
+
],
|
|
534
|
+
},
|
|
535
|
+
update: {
|
|
536
|
+
sections: [
|
|
537
|
+
{ id: 'basic-info', order: 1 },
|
|
538
|
+
{ id: 'category-info', order: 2 },
|
|
539
|
+
{ id: 'ownership', order: 3 },
|
|
540
|
+
{ id: 'placement', order: 4 },
|
|
541
|
+
{ id: 'booking', order: 5 },
|
|
542
|
+
{ id: 'media', order: 6 },
|
|
543
|
+
],
|
|
544
|
+
properties: [
|
|
545
|
+
{ name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
|
|
546
|
+
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
547
|
+
{ name: 'serialNumber', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
548
|
+
{ name: 'testTagIdentificationNumber', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
549
|
+
{ name: 'isRented', layout: { positions: { lg: { colSpan: 12, order: 5 } } } },
|
|
550
|
+
{ name: 'ownerId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
551
|
+
{ name: 'assignedToEmployeeId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
552
|
+
{ name: 'parentId', layout: { positions: { lg: { colSpan: 6, order: 8 } } } },
|
|
553
|
+
{ name: 'locationId', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
|
|
554
|
+
{ name: 'purchaseDate', layout: { positions: { lg: { colSpan: 6, order: 10 } } } },
|
|
555
|
+
{ name: 'commissionedDate', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
|
|
556
|
+
{ name: 'retiredDate', layout: { positions: { lg: { colSpan: 6, order: 12 } } } },
|
|
557
|
+
{ name: 'isBookable', layout: { positions: { lg: { colSpan: 12, order: 13 } } } },
|
|
558
|
+
{ name: 'preBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 14 } } } },
|
|
559
|
+
{ name: 'postBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 15 } } } },
|
|
560
|
+
{
|
|
561
|
+
name: 'qrCode',
|
|
562
|
+
layout: { positions: { lg: { colSpan: 6, rowSpan: 4, order: 16 } } },
|
|
563
|
+
},
|
|
564
|
+
{ name: 'images', layout: { positions: { lg: { colSpan: 12, order: 17 } } } },
|
|
565
|
+
],
|
|
566
|
+
},
|
|
567
|
+
single: {
|
|
568
|
+
title: '{{ title }}',
|
|
569
|
+
sections: [
|
|
570
|
+
{ id: 'basic-info', order: 1 },
|
|
571
|
+
{ id: 'ownership', order: 2 },
|
|
572
|
+
{ id: 'placement', order: 3 },
|
|
573
|
+
{ id: 'lifecycle', order: 4 },
|
|
574
|
+
{ id: 'booking', order: 5 },
|
|
575
|
+
{ id: 'media', order: 6 },
|
|
576
|
+
],
|
|
577
|
+
properties: [
|
|
578
|
+
{ name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
|
|
579
|
+
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
580
|
+
{ name: 'serialNumber', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
581
|
+
{ name: 'testTagIdentificationNumber', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
582
|
+
{ name: 'isRented', layout: { positions: { lg: { colSpan: 12, order: 5 } } } },
|
|
583
|
+
{ name: 'ownerId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
584
|
+
{ name: 'assignedToEmployeeId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
585
|
+
{ name: 'parentId', layout: { positions: { lg: { colSpan: 6, order: 8 } } } },
|
|
586
|
+
{ name: 'locationId', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
|
|
587
|
+
{ name: 'purchaseDate', layout: { positions: { lg: { colSpan: 4, order: 10 } } } },
|
|
588
|
+
{ name: 'commissionedDate', layout: { positions: { lg: { colSpan: 4, order: 11 } } } },
|
|
589
|
+
{ name: 'retiredDate', layout: { positions: { lg: { colSpan: 4, order: 12 } } } },
|
|
590
|
+
{ name: 'isBookable', layout: { positions: { lg: { colSpan: 12, order: 13 } } } },
|
|
591
|
+
{ name: 'preBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 14 } } } },
|
|
592
|
+
{ name: 'postBookQuestionnaireId', layout: { positions: { lg: { colSpan: 6, order: 15 } } } },
|
|
593
|
+
{
|
|
594
|
+
name: 'qrCode',
|
|
595
|
+
layout: { positions: { lg: { colSpan: 6, rowSpan: 4, order: 16 } } },
|
|
596
|
+
},
|
|
597
|
+
{ name: 'images', layout: { positions: { lg: { colSpan: 12, order: 17 } } } },
|
|
598
|
+
],
|
|
599
|
+
actions: [...entityMasterRecordActions()],
|
|
600
|
+
},
|
|
601
|
+
list: {
|
|
602
|
+
actions: [...entityMasterCrudActions()],
|
|
603
|
+
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
};
|
|
608
|
+
return entityDef;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export { factory };
|
|
612
|
+
//# sourceMappingURL=acorex-modules-asset-management-asset.entity-D_w4zjNb.mjs.map
|