kcommons 5.16.16 → 5.17.1
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/build/index.d.ts +2 -0
- package/build/index.js +3 -0
- package/build/templates/notifications/rfq.notifications.d.ts +2 -0
- package/build/templates/notifications/rfq.notifications.js +12 -0
- package/build/typings/company.typings.d.ts +5 -2
- package/build/typings/company.typings.js +1 -0
- package/build/typings/notifications.typings.d.ts +65 -0
- package/build/typings/notifications.typings.js +20 -0
- package/build/typings/user.typings.d.ts +4 -2
- package/build/typings/user.typings.js +1 -0
- package/build/typings/vendor.typings.d.ts +5 -2
- package/build/typings/vendor.typings.js +1 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from "./typings/common/paginationFilters.typings";
|
|
|
33
33
|
export * from "./typings/common/uploadMedia.typings";
|
|
34
34
|
export * from "./typings/common/retrieveMedia.typings";
|
|
35
35
|
export * from "./typings/quote.typings";
|
|
36
|
+
export * from "./typings/notifications.typings";
|
|
36
37
|
export * from "./constants/permission.constants";
|
|
37
38
|
export * from "./constants/entityTypes.constants";
|
|
38
39
|
export * from "./constants/documentStatus.typings";
|
|
@@ -40,3 +41,4 @@ export * from "./constants/form.constants";
|
|
|
40
41
|
export * from "./constants/upload.constants";
|
|
41
42
|
export * from "./classes/asnWrapper.class";
|
|
42
43
|
export * from "./utils/permission.utils";
|
|
44
|
+
export * from "./templates/notifications/rfq.notifications";
|
package/build/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __exportStar(require("./typings/common/paginationFilters.typings"), exports);
|
|
|
50
50
|
__exportStar(require("./typings/common/uploadMedia.typings"), exports);
|
|
51
51
|
__exportStar(require("./typings/common/retrieveMedia.typings"), exports);
|
|
52
52
|
__exportStar(require("./typings/quote.typings"), exports);
|
|
53
|
+
__exportStar(require("./typings/notifications.typings"), exports);
|
|
53
54
|
// Constants
|
|
54
55
|
__exportStar(require("./constants/permission.constants"), exports);
|
|
55
56
|
__exportStar(require("./constants/entityTypes.constants"), exports);
|
|
@@ -60,3 +61,5 @@ __exportStar(require("./constants/upload.constants"), exports);
|
|
|
60
61
|
__exportStar(require("./classes/asnWrapper.class"), exports);
|
|
61
62
|
// Utils
|
|
62
63
|
__exportStar(require("./utils/permission.utils"), exports);
|
|
64
|
+
// Templates
|
|
65
|
+
__exportStar(require("./templates/notifications/rfq.notifications"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RFQ_NOTIFICATION_TEMPLATES = void 0;
|
|
4
|
+
exports.RFQ_NOTIFICATION_TEMPLATES = {
|
|
5
|
+
chanceForApproval: ({ rfq_id, rfq_no, }) => {
|
|
6
|
+
return {
|
|
7
|
+
actionLink: `/purchase/request-for-requisition/${rfq_id}`,
|
|
8
|
+
message: `Please approve the RFQ ${rfq_no}`,
|
|
9
|
+
title: "RFQ Approval",
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -11,6 +11,7 @@ import { IItemSubcategory } from "./itemSubcategory.typings";
|
|
|
11
11
|
import { INestedMI, INestedMIItem } from "./mi.typings";
|
|
12
12
|
import { INestedMRN, INestedMRNItem } from "./mrn.typings";
|
|
13
13
|
import { INestedNegotiation } from "./negotiation.typings";
|
|
14
|
+
import { INestedNotification } from "./notifications.typings";
|
|
14
15
|
import { INestedOffice } from "./offices.typings";
|
|
15
16
|
import { INestedPo } from "./po.typings";
|
|
16
17
|
import { INestedPR, INestedPrItem } from "./pr.typings";
|
|
@@ -56,7 +57,8 @@ export declare enum COMPANY_INCLUDE {
|
|
|
56
57
|
company_boms = "company_boms",
|
|
57
58
|
company_bom_items = "company_bom_items",
|
|
58
59
|
company_comparatives = "company_comparatives",
|
|
59
|
-
company_comparative_items = "company_comparative_items"
|
|
60
|
+
company_comparative_items = "company_comparative_items",
|
|
61
|
+
company_notifications = "company_notifications"
|
|
60
62
|
}
|
|
61
63
|
export interface ICompany extends IAddress {
|
|
62
64
|
id: string;
|
|
@@ -113,6 +115,7 @@ export interface ICompany extends IAddress {
|
|
|
113
115
|
company_bom_items: INestedBOMItem[] | null;
|
|
114
116
|
company_comparatives: INestedComparative[] | null;
|
|
115
117
|
company_comparative_items: INestedComparativeItem[] | null;
|
|
118
|
+
company_notifications: INestedNotification[] | null;
|
|
116
119
|
}
|
|
117
|
-
export interface INestedCompany extends Omit<ICompany, "associated_purchase_locations" | "associated_vendors" | "associated_permissions" | "associated_roles" | "approval_configs" | "subdepartments" | "subcategories" | "categories" | "items" | "offices" | "stores" | "employees" | "departments" | "vendor_groups" | "company_indents" | "indent_items" | "company_mis" | "mi_items" | "company_prs" | "pr_items" | "company_rfqs" | "company_quotes" | "entity_approval_chain_entries" | "company_negotiations" | "company_pos" | "company_grns" | "company_grns_items" | "company_mrns" | "company_mrns_items" | "company_boms" | "company_bom_items" | "company_comparatives" | "company_comparative_items"> {
|
|
120
|
+
export interface INestedCompany extends Omit<ICompany, "associated_purchase_locations" | "associated_vendors" | "associated_permissions" | "associated_roles" | "approval_configs" | "subdepartments" | "subcategories" | "categories" | "items" | "offices" | "stores" | "employees" | "departments" | "vendor_groups" | "company_indents" | "indent_items" | "company_mis" | "mi_items" | "company_prs" | "pr_items" | "company_rfqs" | "company_quotes" | "entity_approval_chain_entries" | "company_negotiations" | "company_pos" | "company_grns" | "company_grns_items" | "company_mrns" | "company_mrns_items" | "company_boms" | "company_bom_items" | "company_comparatives" | "company_comparative_items" | "company_notifications"> {
|
|
118
121
|
}
|
|
@@ -36,4 +36,5 @@ var COMPANY_INCLUDE;
|
|
|
36
36
|
COMPANY_INCLUDE["company_bom_items"] = "company_bom_items";
|
|
37
37
|
COMPANY_INCLUDE["company_comparatives"] = "company_comparatives";
|
|
38
38
|
COMPANY_INCLUDE["company_comparative_items"] = "company_comparative_items";
|
|
39
|
+
COMPANY_INCLUDE["company_notifications"] = "company_notifications";
|
|
39
40
|
})(COMPANY_INCLUDE || (exports.COMPANY_INCLUDE = COMPANY_INCLUDE = {}));
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EntityTypes } from "../constants/entityTypes.constants";
|
|
2
|
+
import { IPERMISSION_ENTITIES, PERMISSION_ACTIONS } from "../constants/permission.constants";
|
|
3
|
+
import { INestedCompany } from "./company.typings";
|
|
4
|
+
import { INestedUser } from "./user.typings";
|
|
5
|
+
import { INestedVendor } from "./vendor.typings";
|
|
6
|
+
export interface INotificationsPayload {
|
|
7
|
+
}
|
|
8
|
+
export declare enum NOTIFICATION_INCLUDE {
|
|
9
|
+
company = "company",
|
|
10
|
+
user = "user",
|
|
11
|
+
vendor = "vendor"
|
|
12
|
+
}
|
|
13
|
+
export interface INotification {
|
|
14
|
+
id: string;
|
|
15
|
+
company_id: string;
|
|
16
|
+
user_id: string | null;
|
|
17
|
+
vendor_id: string | null;
|
|
18
|
+
category: string;
|
|
19
|
+
read: boolean;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
action_link: string | null;
|
|
23
|
+
company: INestedCompany | null;
|
|
24
|
+
user: INestedUser | null;
|
|
25
|
+
vendor: INestedVendor | null;
|
|
26
|
+
}
|
|
27
|
+
export interface INestedNotification extends Omit<INotification, "company" | "vendor" | "user"> {
|
|
28
|
+
}
|
|
29
|
+
export declare enum NOTIFICAITON_CATEGORIES {
|
|
30
|
+
INDIVIDUAL = "INDIVIDUAL",
|
|
31
|
+
GROUP = "GROUP"
|
|
32
|
+
}
|
|
33
|
+
export declare enum GROUP_NOTIFICATION_TYPES {
|
|
34
|
+
ENTITY_DEPENDENT = "ENTITY_DEPENDENT",
|
|
35
|
+
PRIVILEGE_DEPENDENT = "PRIVILEGE_DEPENDENT",
|
|
36
|
+
ENTITY_PRIVILEGE_DEPENDENT = "ENTITY_PRIVILEGE_DEPENDENT"
|
|
37
|
+
}
|
|
38
|
+
export interface IEntityDependentNotificaiton {
|
|
39
|
+
type: GROUP_NOTIFICATION_TYPES.ENTITY_DEPENDENT;
|
|
40
|
+
entity_type: EntityTypes;
|
|
41
|
+
entity_id: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IPrivilegeDependentNotifications {
|
|
44
|
+
type: GROUP_NOTIFICATION_TYPES.PRIVILEGE_DEPENDENT;
|
|
45
|
+
permission_entity: IPERMISSION_ENTITIES;
|
|
46
|
+
actions: PERMISSION_ACTIONS[];
|
|
47
|
+
}
|
|
48
|
+
export interface IEntityAndPrivilegeDependentNotifications {
|
|
49
|
+
type: GROUP_NOTIFICATION_TYPES.ENTITY_PRIVILEGE_DEPENDENT;
|
|
50
|
+
entity_type: EntityTypes;
|
|
51
|
+
entity_id: string;
|
|
52
|
+
permission_entity: IPERMISSION_ENTITIES;
|
|
53
|
+
actions: PERMISSION_ACTIONS[];
|
|
54
|
+
}
|
|
55
|
+
export type IGroupNotification = IEntityAndPrivilegeDependentNotifications | IPrivilegeDependentNotifications | IEntityAndPrivilegeDependentNotifications;
|
|
56
|
+
export interface IIndividualNotification {
|
|
57
|
+
user_id: string;
|
|
58
|
+
vendor_id: string;
|
|
59
|
+
}
|
|
60
|
+
export type INotificationType = IIndividualNotification | IGroupNotification;
|
|
61
|
+
export interface INotificationTemplate {
|
|
62
|
+
title: string;
|
|
63
|
+
message: string;
|
|
64
|
+
actionLink: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GROUP_NOTIFICATION_TYPES = exports.NOTIFICAITON_CATEGORIES = exports.NOTIFICATION_INCLUDE = void 0;
|
|
4
|
+
var NOTIFICATION_INCLUDE;
|
|
5
|
+
(function (NOTIFICATION_INCLUDE) {
|
|
6
|
+
NOTIFICATION_INCLUDE["company"] = "company";
|
|
7
|
+
NOTIFICATION_INCLUDE["user"] = "user";
|
|
8
|
+
NOTIFICATION_INCLUDE["vendor"] = "vendor";
|
|
9
|
+
})(NOTIFICATION_INCLUDE || (exports.NOTIFICATION_INCLUDE = NOTIFICATION_INCLUDE = {}));
|
|
10
|
+
var NOTIFICAITON_CATEGORIES;
|
|
11
|
+
(function (NOTIFICAITON_CATEGORIES) {
|
|
12
|
+
NOTIFICAITON_CATEGORIES["INDIVIDUAL"] = "INDIVIDUAL";
|
|
13
|
+
NOTIFICAITON_CATEGORIES["GROUP"] = "GROUP";
|
|
14
|
+
})(NOTIFICAITON_CATEGORIES || (exports.NOTIFICAITON_CATEGORIES = NOTIFICAITON_CATEGORIES = {}));
|
|
15
|
+
var GROUP_NOTIFICATION_TYPES;
|
|
16
|
+
(function (GROUP_NOTIFICATION_TYPES) {
|
|
17
|
+
GROUP_NOTIFICATION_TYPES["ENTITY_DEPENDENT"] = "ENTITY_DEPENDENT";
|
|
18
|
+
GROUP_NOTIFICATION_TYPES["PRIVILEGE_DEPENDENT"] = "PRIVILEGE_DEPENDENT";
|
|
19
|
+
GROUP_NOTIFICATION_TYPES["ENTITY_PRIVILEGE_DEPENDENT"] = "ENTITY_PRIVILEGE_DEPENDENT";
|
|
20
|
+
})(GROUP_NOTIFICATION_TYPES || (exports.GROUP_NOTIFICATION_TYPES = GROUP_NOTIFICATION_TYPES = {}));
|
|
@@ -79,8 +79,9 @@ export interface IUser {
|
|
|
79
79
|
created_vendor_groups?: INestedVendorGroups[] | null;
|
|
80
80
|
last_updated_vendor_groups?: INestedVendorGroups[] | null;
|
|
81
81
|
comparatives_sent_for_approval?: INestedComparative[] | null;
|
|
82
|
+
user_notifications?: INestedNegotiation[] | null;
|
|
82
83
|
}
|
|
83
|
-
export interface INestedUser extends Omit<IUser, "reporting_to" | "active_company" | "active_role" | "subordinates" | "otps" | "as_incharge_in_purchase_locations" | "as_incharge_in_store_locations" | "as_incharge_in_offices" | "as_incharge_in_gates" | "as_contact_person_companies" | "as_contact_person_offices" | "as_contact_person_gates" | "as_contact_person_for_grns" | "as_contact_person_for_mrns" | "owned_companies" | "head_for_departments" | "approved_items" | "approval_chains" | "created_indents" | "created_mis" | "created_prs" | "created_rfqs" | "entity_approval_chains" | "rfqs_sent_for_approval" | "rfqs_sent_to_vendors" | "created_rfq_items" | "assigned_roles" | "negotiations" | "created_pos" | "as_contact_person_for_pos" | "pos_sent_for_approval" | "pos_sent_to_vendors" | "grns_sent_for_approval" | "grns_sent_to_store" | "mrns_sent_for_approval" | "created_boms" | "last_updated_boms" | "created_vendor_groups" | "last_updated_vendor_groups" | "comparatives_sent_for_approval"> {
|
|
84
|
+
export interface INestedUser extends Omit<IUser, "reporting_to" | "active_company" | "active_role" | "subordinates" | "otps" | "as_incharge_in_purchase_locations" | "as_incharge_in_store_locations" | "as_incharge_in_offices" | "as_incharge_in_gates" | "as_contact_person_companies" | "as_contact_person_offices" | "as_contact_person_gates" | "as_contact_person_for_grns" | "as_contact_person_for_mrns" | "owned_companies" | "head_for_departments" | "approved_items" | "approval_chains" | "created_indents" | "created_mis" | "created_prs" | "created_rfqs" | "entity_approval_chains" | "rfqs_sent_for_approval" | "rfqs_sent_to_vendors" | "created_rfq_items" | "assigned_roles" | "negotiations" | "created_pos" | "as_contact_person_for_pos" | "pos_sent_for_approval" | "pos_sent_to_vendors" | "grns_sent_for_approval" | "grns_sent_to_store" | "mrns_sent_for_approval" | "created_boms" | "last_updated_boms" | "created_vendor_groups" | "last_updated_vendor_groups" | "comparatives_sent_for_approval" | "user_notifications"> {
|
|
84
85
|
}
|
|
85
86
|
export declare enum UserInclude {
|
|
86
87
|
as_incharge_in_purchase_locations = "as_incharge_in_purchase_locations",
|
|
@@ -110,5 +111,6 @@ export declare enum UserInclude {
|
|
|
110
111
|
created_vendor_groups = "created_vendor_groups",
|
|
111
112
|
last_updated_vendor_groups = "last_updated_vendor_groups",
|
|
112
113
|
active_role = "active_role",
|
|
113
|
-
comparatives_sent_for_approval = "comparatives_sent_for_approval"
|
|
114
|
+
comparatives_sent_for_approval = "comparatives_sent_for_approval",
|
|
115
|
+
user_notifications = "user_notifications"
|
|
114
116
|
}
|
|
@@ -32,4 +32,5 @@ var UserInclude;
|
|
|
32
32
|
UserInclude["last_updated_vendor_groups"] = "last_updated_vendor_groups";
|
|
33
33
|
UserInclude["active_role"] = "active_role";
|
|
34
34
|
UserInclude["comparatives_sent_for_approval"] = "comparatives_sent_for_approval";
|
|
35
|
+
UserInclude["user_notifications"] = "user_notifications";
|
|
35
36
|
})(UserInclude || (exports.UserInclude = UserInclude = {}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INestedCompany } from "./company.typings";
|
|
2
2
|
import { INestedNegotiation } from "./negotiation.typings";
|
|
3
|
+
import { INestedNotification } from "./notifications.typings";
|
|
3
4
|
import { INestedQuote } from "./quote.typings";
|
|
4
5
|
import { INestedRFQ } from "./rfq.typings";
|
|
5
6
|
import { IAddress } from "./utils/address.typings";
|
|
@@ -39,14 +40,16 @@ export interface IVendor extends IAddress {
|
|
|
39
40
|
associated_companies: INestedCompany[] | null;
|
|
40
41
|
negotiations: INestedNegotiation[] | null;
|
|
41
42
|
as_additional_in_rfqs: INestedRFQ[] | null;
|
|
43
|
+
vendor_notifications: INestedNotification[] | null;
|
|
42
44
|
}
|
|
43
|
-
export interface INestedVendor extends Omit<IVendor, "quotes" | "associated_companies" | "negotiations" | "as_additional_in_rfqs"> {
|
|
45
|
+
export interface INestedVendor extends Omit<IVendor, "quotes" | "associated_companies" | "negotiations" | "as_additional_in_rfqs" | "vendor_notifications"> {
|
|
44
46
|
}
|
|
45
47
|
export declare enum VENDOR_INCLUDE {
|
|
46
48
|
quotes = "quotes",
|
|
47
49
|
associated_companies = "associated_companies",
|
|
48
50
|
negotiations = "negotiations",
|
|
49
|
-
as_additional_in_rfqs = "as_additional_in_rfqs"
|
|
51
|
+
as_additional_in_rfqs = "as_additional_in_rfqs",
|
|
52
|
+
vendor_notifications = "vendor_notifications"
|
|
50
53
|
}
|
|
51
54
|
export interface IVENDOR_TOKEN_PAYLOAD {
|
|
52
55
|
vendor_id: string;
|
|
@@ -7,5 +7,6 @@ var VENDOR_INCLUDE;
|
|
|
7
7
|
VENDOR_INCLUDE["associated_companies"] = "associated_companies";
|
|
8
8
|
VENDOR_INCLUDE["negotiations"] = "negotiations";
|
|
9
9
|
VENDOR_INCLUDE["as_additional_in_rfqs"] = "as_additional_in_rfqs";
|
|
10
|
+
VENDOR_INCLUDE["vendor_notifications"] = "vendor_notifications";
|
|
10
11
|
// pos = "pos",
|
|
11
12
|
})(VENDOR_INCLUDE || (exports.VENDOR_INCLUDE = VENDOR_INCLUDE = {}));
|