law-common 12.7.1-beta.7 → 12.7.1-beta.9
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/entities/interface/field-constraint/rate_field_constraints.interface.js +1 -2
- package/dist/src/entities/interface/field-constraint/utils.d.ts +1 -1
- package/dist/src/entities/model/designation.entity.model.d.ts +2 -0
- package/dist/src/entities/model/designation.entity.model.js +7 -0
- package/dist/src/entities/model/rate.entity.model.js +1 -1
- package/package.json +1 -1
|
@@ -40,4 +40,6 @@ export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.D
|
|
|
40
40
|
[key: string]: () => boolean;
|
|
41
41
|
};
|
|
42
42
|
isUserAssignedToDesignation(): boolean;
|
|
43
|
+
static getByUserAssignedToDesignation(designationEntityModels: DesignationEntityModel[]): DesignationEntityModel[];
|
|
44
|
+
getNameOfUsersAssignedToCurrentDesignation(): string[];
|
|
43
45
|
}
|
|
@@ -104,6 +104,13 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
104
104
|
var _a;
|
|
105
105
|
return ((_a = this.users) !== null && _a !== void 0 ? _a : []).length > 0;
|
|
106
106
|
}
|
|
107
|
+
static getByUserAssignedToDesignation(designationEntityModels) {
|
|
108
|
+
return designationEntityModels.filter((designation) => designation.isUserAssignedToDesignation());
|
|
109
|
+
}
|
|
110
|
+
getNameOfUsersAssignedToCurrentDesignation() {
|
|
111
|
+
var _a;
|
|
112
|
+
return ((_a = this.users) !== null && _a !== void 0 ? _a : []).map((user) => user.name);
|
|
113
|
+
}
|
|
107
114
|
}
|
|
108
115
|
exports.DesignationEntityModel = DesignationEntityModel;
|
|
109
116
|
DesignationEntityModel.relationConfigs = [
|
|
@@ -143,7 +143,7 @@ RateEntityModel.relationConfigs = [
|
|
|
143
143
|
{
|
|
144
144
|
name: entity_utils_interface_1.EntityEnum.DESIGNATION,
|
|
145
145
|
relation: relation_type_enum_1.RelationType.ONE,
|
|
146
|
-
key: "
|
|
146
|
+
key: "designationModel",
|
|
147
147
|
mapKeyConfig: {
|
|
148
148
|
relationKey: "name",
|
|
149
149
|
key: "designation",
|