acomm-core-lib 2.6.18 → 2.6.20
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/dist/src/core/common/utils/bull_queue.js +2 -2
- package/dist/src/core/common/utils/bull_queue.js.map +1 -1
- package/dist/src/core/core.module.js +2 -0
- package/dist/src/core/core.module.js.map +1 -1
- package/dist/src/core/core.service.d.ts +1 -0
- package/dist/src/core/core.service.js +7 -0
- package/dist/src/core/core.service.js.map +1 -1
- package/dist/src/core/entities/entities.service.d.ts +1 -0
- package/dist/src/core/entities/entities.service.js +43 -49
- package/dist/src/core/entities/entities.service.js.map +1 -1
- package/dist/src/core/entities/entity.schema.d.ts +2 -0
- package/dist/src/core/entities/entity.schema.js +8 -0
- package/dist/src/core/entities/entity.schema.js.map +1 -1
- package/dist/src/core/index.d.ts +3 -0
- package/dist/src/core/index.js +15 -8
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/queue/queue.module.d.ts +1 -1
- package/dist/src/core/queue/queue.module.js +2 -2
- package/dist/src/core/queue/queue.module.js.map +1 -1
- package/dist/src/core/queue/queue.service.d.ts +3 -1
- package/dist/src/core/queue/queue.service.js +19 -15
- package/dist/src/core/queue/queue.service.js.map +1 -1
- package/dist/src/core/setting/dto/general_setting.dto.d.ts +1 -0
- package/dist/src/core/setting/dto/general_setting.dto.js +4 -0
- package/dist/src/core/setting/dto/general_setting.dto.js.map +1 -1
- package/dist/src/core/setting/setting.constant.d.ts +1 -0
- package/dist/src/core/setting/setting.constant.js +19 -0
- package/dist/src/core/setting/setting.constant.js.map +1 -1
- package/dist/src/core/setting/setting.service.js +6 -1
- package/dist/src/core/setting/setting.service.js.map +1 -1
- package/dist/src/core/translate/translate.json +7 -0
- package/dist/src/core/uom/data/uom.json +205 -0
- package/dist/src/core/uom/uom.layout.d.ts +2 -0
- package/dist/src/core/uom/uom.layout.js +261 -0
- package/dist/src/core/uom/uom.layout.js.map +1 -0
- package/dist/src/core/uom/uom.module.d.ts +2 -0
- package/dist/src/core/uom/uom.module.js +38 -0
- package/dist/src/core/uom/uom.module.js.map +1 -0
- package/dist/src/core/uom/uom.schema.d.ts +26 -0
- package/dist/src/core/uom/uom.schema.js +47 -0
- package/dist/src/core/uom/uom.schema.js.map +1 -0
- package/dist/src/core/uom/uom.service.d.ts +13 -0
- package/dist/src/core/uom/uom.service.js +55 -0
- package/dist/src/core/uom/uom.service.js.map +1 -0
- package/dist/src/core/users/user.constant.js +1 -0
- package/dist/src/core/users/user.constant.js.map +1 -1
- package/dist/src/core/users/user.layout.js +13 -0
- package/dist/src/core/users/user.layout.js.map +1 -1
- package/dist/src/core/users/user.service.d.ts +2 -0
- package/dist/src/core/users/user.service.js +14 -1
- package/dist/src/core/users/user.service.js.map +1 -1
- package/dist/src/main.js +2 -0
- package/dist/src/main.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UomLayout = void 0;
|
|
4
|
+
exports.UomLayout = [
|
|
5
|
+
{
|
|
6
|
+
name: "UoM",
|
|
7
|
+
code: "default",
|
|
8
|
+
type: ["standard"],
|
|
9
|
+
detail: {
|
|
10
|
+
title: {
|
|
11
|
+
format: "${ code }"
|
|
12
|
+
},
|
|
13
|
+
blocks: [
|
|
14
|
+
{
|
|
15
|
+
key: "a1c8e04b7d29f6e3c5b1",
|
|
16
|
+
type: "column",
|
|
17
|
+
layout: {
|
|
18
|
+
num_of_col: 2,
|
|
19
|
+
fields: [
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
field: "code",
|
|
23
|
+
label: "Code",
|
|
24
|
+
read_only: false,
|
|
25
|
+
restrict: false,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
field: "symbol",
|
|
30
|
+
label: "Symbol",
|
|
31
|
+
read_only: false,
|
|
32
|
+
restrict: false,
|
|
33
|
+
required: true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
field: "createdAt",
|
|
37
|
+
label: "Create Date",
|
|
38
|
+
read_only: true,
|
|
39
|
+
permission_layout_read_only: [],
|
|
40
|
+
permission_layout_read_only_allow_actions: "",
|
|
41
|
+
restrict: true,
|
|
42
|
+
permission_layout_restrict: [],
|
|
43
|
+
permission_layout_restrict_allow_actions: "create",
|
|
44
|
+
required: false,
|
|
45
|
+
description: "",
|
|
46
|
+
placeholder: "",
|
|
47
|
+
trigger: [],
|
|
48
|
+
_translates: {
|
|
49
|
+
"en-US": {
|
|
50
|
+
label: "Create Date",
|
|
51
|
+
placeholder: "",
|
|
52
|
+
description: ""
|
|
53
|
+
},
|
|
54
|
+
"th-TH": {
|
|
55
|
+
label: "",
|
|
56
|
+
placeholder: "",
|
|
57
|
+
description: ""
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
date_format: "",
|
|
61
|
+
hide_label: false
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
field: "uom_category",
|
|
67
|
+
type: "advanced_component",
|
|
68
|
+
label: "Category",
|
|
69
|
+
unique_key: "advanced_component_uom_category_c4e8a17b9d02f6e3a5b1",
|
|
70
|
+
link_type: "field",
|
|
71
|
+
name: "category",
|
|
72
|
+
read_only: false,
|
|
73
|
+
restrict: false,
|
|
74
|
+
required: true,
|
|
75
|
+
hide_label: false,
|
|
76
|
+
placeholder: "",
|
|
77
|
+
description: "",
|
|
78
|
+
trigger: []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
field: "enabled",
|
|
82
|
+
label: "Enabled",
|
|
83
|
+
read_only: false,
|
|
84
|
+
restrict: false,
|
|
85
|
+
required: false,
|
|
86
|
+
yes_label: "YES",
|
|
87
|
+
no_label: "NO"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
field: "updatedAt",
|
|
91
|
+
label: "Update Date",
|
|
92
|
+
read_only: true,
|
|
93
|
+
permission_layout_read_only: [],
|
|
94
|
+
permission_layout_read_only_allow_actions: "",
|
|
95
|
+
restrict: true,
|
|
96
|
+
permission_layout_restrict: [],
|
|
97
|
+
permission_layout_restrict_allow_actions: "create",
|
|
98
|
+
required: false,
|
|
99
|
+
description: "",
|
|
100
|
+
placeholder: "",
|
|
101
|
+
trigger: [],
|
|
102
|
+
_translates: {
|
|
103
|
+
"en-US": {
|
|
104
|
+
label: "Update Date",
|
|
105
|
+
placeholder: "",
|
|
106
|
+
description: ""
|
|
107
|
+
},
|
|
108
|
+
"th-TH": {
|
|
109
|
+
label: "",
|
|
110
|
+
placeholder: "",
|
|
111
|
+
description: ""
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
date_format: "",
|
|
115
|
+
hide_label: false
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: "b4d7f18e2a60c9d5e8f3",
|
|
123
|
+
type: "column",
|
|
124
|
+
layout: {
|
|
125
|
+
num_of_col: 1,
|
|
126
|
+
fields: [
|
|
127
|
+
[
|
|
128
|
+
{
|
|
129
|
+
field: "text_multi_language",
|
|
130
|
+
type: "advanced_component",
|
|
131
|
+
label: "Label",
|
|
132
|
+
unique_key: "advanced_component_text_multi_language_d5f9b28c0e13a7f4b6c2",
|
|
133
|
+
link_type: "field",
|
|
134
|
+
name: "label",
|
|
135
|
+
read_only: false,
|
|
136
|
+
restrict: false,
|
|
137
|
+
required: true,
|
|
138
|
+
hide_label: false,
|
|
139
|
+
placeholder: "",
|
|
140
|
+
description: "",
|
|
141
|
+
languages: ["en-US"],
|
|
142
|
+
trigger: []
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
list: {
|
|
151
|
+
allow_search: false,
|
|
152
|
+
allow_sort: false,
|
|
153
|
+
allow_filter: false,
|
|
154
|
+
allow_bulk: false,
|
|
155
|
+
entries_per_page: 10,
|
|
156
|
+
default_sort: "id",
|
|
157
|
+
columns: [
|
|
158
|
+
{
|
|
159
|
+
field: "code",
|
|
160
|
+
label: "Code",
|
|
161
|
+
allow_sort: true,
|
|
162
|
+
allow_search: true,
|
|
163
|
+
allow_filter: true,
|
|
164
|
+
align: "left"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
field: "category",
|
|
168
|
+
label: "Category",
|
|
169
|
+
allow_sort: true,
|
|
170
|
+
allow_search: true,
|
|
171
|
+
allow_filter: true,
|
|
172
|
+
align: "left"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
field: "symbol",
|
|
176
|
+
label: "Symbol",
|
|
177
|
+
allow_sort: true,
|
|
178
|
+
allow_search: true,
|
|
179
|
+
allow_filter: true,
|
|
180
|
+
align: "left"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
field: "enabled",
|
|
184
|
+
label: "Enabled",
|
|
185
|
+
allow_sort: true,
|
|
186
|
+
allow_search: false,
|
|
187
|
+
allow_filter: true,
|
|
188
|
+
align: "center"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
field: "createdAt",
|
|
192
|
+
label: "Create Date",
|
|
193
|
+
date_format: "",
|
|
194
|
+
allow_sort: true,
|
|
195
|
+
allow_filter: true,
|
|
196
|
+
align: "left",
|
|
197
|
+
allow_search: false,
|
|
198
|
+
_translates: {
|
|
199
|
+
"en-US": {
|
|
200
|
+
label: "Create Date"
|
|
201
|
+
},
|
|
202
|
+
"th-TH": {
|
|
203
|
+
label: ""
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
field: "updatedAt",
|
|
209
|
+
label: "Update Date",
|
|
210
|
+
date_format: "",
|
|
211
|
+
allow_sort: true,
|
|
212
|
+
allow_filter: true,
|
|
213
|
+
align: "left",
|
|
214
|
+
allow_search: false,
|
|
215
|
+
_translates: {
|
|
216
|
+
"en-US": {
|
|
217
|
+
label: "Update Date"
|
|
218
|
+
},
|
|
219
|
+
"th-TH": {
|
|
220
|
+
label: ""
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
row_conditions: []
|
|
226
|
+
},
|
|
227
|
+
allow_import_export_raw_json: false,
|
|
228
|
+
allow_clone: false,
|
|
229
|
+
hide_activity_log: false,
|
|
230
|
+
hide_save: false,
|
|
231
|
+
show_refresh: true,
|
|
232
|
+
filters: {
|
|
233
|
+
filters: [],
|
|
234
|
+
value: ""
|
|
235
|
+
},
|
|
236
|
+
allow_actions: [
|
|
237
|
+
{
|
|
238
|
+
action: "create",
|
|
239
|
+
role_restrictions: []
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
action: "update",
|
|
243
|
+
role_restrictions: []
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
action: "delete",
|
|
247
|
+
role_restrictions: []
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
action: "print",
|
|
251
|
+
role_restrictions: []
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
action: "export/import",
|
|
255
|
+
role_restrictions: []
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
restriction: []
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
//# sourceMappingURL=uom.layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.layout.js","sourceRoot":"","sources":["../../../../src/core/uom/uom.layout.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAmB;IACvC;QACE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,CAAC,UAAU,CAAC;QAClB,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,MAAM,EAAE,WAAW;aACpB;YACD,MAAM,EAAE;gBACN;o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E,KAAK;oBACnB,WAAW,EAAE;wBACX,OAAO,EAAE;4BACP,KAAK,EAAE,aAAa;yBACrB;wBACD,OAAO,EAAE;4BACP,KAAK,EAAE,EAAE;yBACV;qBACF;iBACF;gBACD;oBACE,KAAK,EAAE,WAAW;oBAClB,KAAK,EAAE,aAAa;oBACpB,WAAW,EAAE,EAAE;oBACf,UAAU,EAAE,IAAI;oBAChB,YAAY,EAAE,IAAI;oBAClB,KAAK,EAAE,MAAM;oBACb,YAAY,EAAE,KAAK;oBACnB,WAAW,EAAE;wBACX,OAAO,EAAE;4BACP,KAAK,EAAE,aAAa;yBACrB;wBACD,OAAO,EAAE;4BACP,KAAK,EAAE,EAAE;yBACV;qBACF;iBACF;aACF;YACD,cAAc,EAAE,EAAE;SACnB;QACD,4BAA4B,EAAE,KAAK;QACnC,WAAW,EAAE,KAAK;QAClB,iBAAiB,EAAE,KAAK;QACxB,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;SACV;QACD,aAAa,EAAE;YACb;gBACE,MAAM,EAAE,QAAQ;gBAChB,iBAAiB,EAAE,EAAE;aACtB;YACD;gBACE,MAAM,EAAE,QAAQ;gBAChB,iBAAiB,EAAE,EAAE;aACtB;YACD;gBACE,MAAM,EAAE,QAAQ;gBAChB,iBAAiB,EAAE,EAAE;aACtB;YACD;gBACE,MAAM,EAAE,OAAO;gBACf,iBAAiB,EAAE,EAAE;aACtB;YACD;gBACE,MAAM,EAAE,eAAe;gBACvB,iBAAiB,EAAE,EAAE;aACtB;SACF;QACD,WAAW,EAAE,EAAE;KAChB;CACF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.UomModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
12
|
+
const entities_module_1 = require("../entities/entities.module");
|
|
13
|
+
const uom_service_1 = require("./uom.service");
|
|
14
|
+
const uom_schema_1 = require("./uom.schema");
|
|
15
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
16
|
+
let UomModule = class UomModule {
|
|
17
|
+
};
|
|
18
|
+
exports.UomModule = UomModule;
|
|
19
|
+
exports.UomModule = UomModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [
|
|
22
|
+
mongoose_1.MongooseModule.forFeatureAsync([
|
|
23
|
+
{
|
|
24
|
+
name: "uom",
|
|
25
|
+
useFactory: () => {
|
|
26
|
+
const schema = uom_schema_1.UomSchema;
|
|
27
|
+
return schema;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]),
|
|
31
|
+
nestjs_cls_1.ClsModule,
|
|
32
|
+
entities_module_1.EntitiesModule
|
|
33
|
+
],
|
|
34
|
+
providers: [uom_service_1.UomService],
|
|
35
|
+
exports: [uom_service_1.UomService]
|
|
36
|
+
})
|
|
37
|
+
], UomModule);
|
|
38
|
+
//# sourceMappingURL=uom.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.module.js","sourceRoot":"","sources":["../../../../src/core/uom/uom.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAElD,iEAAmE;AACnE,+CAA2C;AAC3C,6CAAyC;AACzC,2CAAuC;AAmBhC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAjBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,eAAe,CAAC;gBAC7B;oBACE,IAAI,EAAE,KAAK;oBACX,UAAU,EAAE,GAAG,EAAE;wBACf,MAAM,MAAM,GAAG,sBAAS,CAAC;wBACzB,OAAO,MAAM,CAAC;oBAChB,CAAC;iBACF;aACF,CAAC;YACF,sBAAS;YACT,gCAAc;SACf;QACD,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as mongoose from "mongoose";
|
|
2
|
+
import { BaseSchema } from "../common/base/base.schema";
|
|
3
|
+
export declare class Uom extends BaseSchema {
|
|
4
|
+
code: String;
|
|
5
|
+
category: String;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
symbol: String;
|
|
8
|
+
label: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const UomSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
11
|
+
[x: number]: unknown;
|
|
12
|
+
[x: symbol]: unknown;
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
15
|
+
[x: number]: unknown;
|
|
16
|
+
[x: symbol]: unknown;
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
}>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<{
|
|
19
|
+
[x: number]: unknown;
|
|
20
|
+
[x: symbol]: unknown;
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
}> & Required<{
|
|
23
|
+
_id: unknown;
|
|
24
|
+
}> & {
|
|
25
|
+
__v: number;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UomSchema = exports.Uom = void 0;
|
|
13
|
+
const mongoose = require("mongoose");
|
|
14
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
15
|
+
const base_schema_1 = require("../common/base/base.schema");
|
|
16
|
+
let Uom = class Uom extends base_schema_1.BaseSchema {
|
|
17
|
+
};
|
|
18
|
+
exports.Uom = Uom;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ required: true, is_unique: true }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Uom.prototype, "code", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Uom.prototype, "category", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Uom.prototype, "enabled", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Uom.prototype, "symbol", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({
|
|
37
|
+
type: mongoose.Schema.Types.Mixed,
|
|
38
|
+
json_type: "standard",
|
|
39
|
+
required: true
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], Uom.prototype, "label", void 0);
|
|
43
|
+
exports.Uom = Uom = __decorate([
|
|
44
|
+
(0, mongoose_1.Schema)({ strict: false, timestamps: true })
|
|
45
|
+
], Uom);
|
|
46
|
+
exports.UomSchema = base_schema_1.BaseSchemaFactory.createForClass(Uom);
|
|
47
|
+
//# sourceMappingURL=uom.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.schema.js","sourceRoot":"","sources":["../../../../src/core/uom/uom.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAqC;AACrC,+CAAgD;AAChD,4DAG0C;AAGnC,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,wBAAU;CAmBlC,CAAA;AAnBY,kBAAG;AAEd;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BACpC,MAAM;iCAAC;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,MAAM;qCAAC;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oCACtB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjB,MAAM;mCAAC;AAOf;IALC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;QACjC,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,IAAI;KACf,CAAC;;kCACS;cAlBA,GAAG;IADf,IAAA,iBAAM,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GAC/B,GAAG,CAmBf;AACY,QAAA,SAAS,GAAG,+BAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as mongoose from "mongoose";
|
|
2
|
+
import { EntitiesService } from "../entities/entities.service";
|
|
3
|
+
import { BaseService } from "../common/base/base.service";
|
|
4
|
+
import { ClsService } from "nestjs-cls";
|
|
5
|
+
import { Uom } from "./uom.schema";
|
|
6
|
+
export declare class UomService extends BaseService<Uom> {
|
|
7
|
+
readonly cls: ClsService;
|
|
8
|
+
private entitiesService;
|
|
9
|
+
protected model: mongoose.Model<Uom>;
|
|
10
|
+
constructor(cls: ClsService, entitiesService: EntitiesService, model: mongoose.Model<Uom>);
|
|
11
|
+
init(): Promise<string>;
|
|
12
|
+
initData(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var UomService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UomService = void 0;
|
|
17
|
+
const _ = require("lodash");
|
|
18
|
+
const mongoose = require("mongoose");
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
21
|
+
const entities_service_1 = require("../entities/entities.service");
|
|
22
|
+
const base_service_1 = require("../common/base/base.service");
|
|
23
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
24
|
+
const entity_1 = require("../common/utils/entity");
|
|
25
|
+
const defaultUom = require("./data/uom.json");
|
|
26
|
+
const schema_1 = require("../common/utils/schema");
|
|
27
|
+
const uom_schema_1 = require("./uom.schema");
|
|
28
|
+
const uom_layout_1 = require("./uom.layout");
|
|
29
|
+
let UomService = UomService_1 = class UomService extends base_service_1.BaseService {
|
|
30
|
+
constructor(cls, entitiesService, model) {
|
|
31
|
+
super(cls, model);
|
|
32
|
+
this.cls = cls;
|
|
33
|
+
this.entitiesService = entitiesService;
|
|
34
|
+
this.model = model;
|
|
35
|
+
}
|
|
36
|
+
async init() {
|
|
37
|
+
await this.entitiesService.refreshSystemSchema(UomService_1, this.model, uom_schema_1.Uom, uom_schema_1.UomSchema, { hooks: [], layouts: uom_layout_1.UomLayout });
|
|
38
|
+
(0, entity_1.initData)(_.snakeCase(uom_schema_1.Uom.name));
|
|
39
|
+
return "uom";
|
|
40
|
+
}
|
|
41
|
+
async initData() {
|
|
42
|
+
const count = await this.count();
|
|
43
|
+
if (count === 0) {
|
|
44
|
+
await (0, schema_1.callBulkCreateInternalService)(_.snakeCase(uom_schema_1.Uom.name), defaultUom);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.UomService = UomService;
|
|
49
|
+
exports.UomService = UomService = UomService_1 = __decorate([
|
|
50
|
+
(0, common_1.Injectable)(),
|
|
51
|
+
__param(2, (0, mongoose_1.InjectModel)("uom")),
|
|
52
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService,
|
|
53
|
+
entities_service_1.EntitiesService, mongoose.Model])
|
|
54
|
+
], UomService);
|
|
55
|
+
//# sourceMappingURL=uom.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.service.js","sourceRoot":"","sources":["../../../../src/core/uom/uom.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,qCAAqC;AACrC,2CAA4C;AAC5C,+CAA+C;AAC/C,mEAAqE;AACrE,8DAAgE;AAChE,2CAAwC;AACxC,mDAAkD;AAClD,8CAA8C;AAC9C,mDAAuE;AACvE,6CAA8C;AAC9C,6CAAyC;AAGlC,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,0BAAgB;IAC9C,YACW,GAAe,EAChB,eAAgC,EAE9B,KAA0B;QAEpC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QALT,QAAG,GAAH,GAAG,CAAY;QAChB,oBAAe,GAAf,eAAe,CAAiB;QAE9B,UAAK,GAAL,KAAK,CAAqB;IAGtC,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC5C,YAAU,EACV,IAAI,CAAC,KAAK,EACV,gBAAG,EACH,sBAAS,EACT,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,sBAAS,EAAE,CAClC,CAAC;QAEF,IAAA,iBAAQ,EAAC,CAAC,CAAC,SAAS,CAAC,gBAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAEhC,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACjC,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,MAAM,IAAA,sCAA6B,EAAC,CAAC,CAAC,SAAS,CAAC,gBAAG,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF,CAAA;AA9BY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,sBAAW,EAAC,KAAK,CAAC,CAAA;qCAFL,uBAAU;QACC,kCAAe,EAEvB,QAAQ,CAAC,KAAK;GALtB,UAAU,CA8BtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.constant.js","sourceRoot":"","sources":["../../../../src/core/users/user.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa,GACjB,0IAA0I,CAAC;
|
|
1
|
+
{"version":3,"file":"user.constant.js","sourceRoot":"","sources":["../../../../src/core/users/user.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa,GACjB,0IAA0I,CAAC;AAiCpI,sCAAa;AAhCtB,MAAM,aAAa,GACjB,8rBAA8rB,CAAC;AA+BzqB,sCAAa;AA7BrC,MAAM,gBAAgB,GAAG;IACvB,eAAe;IACf,WAAW;IACX,SAAS;IACT,UAAU;IACV,SAAS;IACT,UAAU;IACV,WAAW;IACX,UAAU;IACV,KAAK;IACL,UAAU;IACV,UAAU;IACV,aAAa;IACb,cAAc;IACd,KAAK;IACL,SAAS;IACT,SAAS;IACT,iBAAiB;IACjB,QAAQ;IACR,MAAM;IACN,WAAW;IACX,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,gBAAgB;CACjB,CAAC;AAEqC,4CAAgB"}
|
|
@@ -1841,6 +1841,19 @@ exports.UserRoleLayout = [
|
|
|
1841
1841
|
yes_label: "Yes",
|
|
1842
1842
|
no_label: "No"
|
|
1843
1843
|
}
|
|
1844
|
+
],
|
|
1845
|
+
[
|
|
1846
|
+
{
|
|
1847
|
+
field: "switch",
|
|
1848
|
+
type: "standard_component",
|
|
1849
|
+
unique_key: "standard_component_switch_c81e4a2f-9d36-4b70-8f15-2a7e6d0c4b91",
|
|
1850
|
+
key: "permisson_tab.system.manage_uom",
|
|
1851
|
+
label: "UoM",
|
|
1852
|
+
default_value: false,
|
|
1853
|
+
link_type: "key",
|
|
1854
|
+
yes_label: "Yes",
|
|
1855
|
+
no_label: "No"
|
|
1856
|
+
}
|
|
1844
1857
|
]
|
|
1845
1858
|
]
|
|
1846
1859
|
}
|