kcommons 9.11.2 → 9.12.0

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.
@@ -1,16 +0,0 @@
1
- import { INotificationTemplate } from "../../typings/notifications.typings";
2
- export declare const PO_NOTIFICATIONS: {
3
- /** For company users who belong to same purchase location as PO,
4
- * to send the PO to vendors as it has been approved */
5
- poApproved: (po_id: string, po_no: string) => INotificationTemplate;
6
- /** For company user who precceds the rejecting user*/
7
- poRejection: (po_id: string, po_no: string, rejectedBy: string) => INotificationTemplate;
8
- /** For Company users whose chance is for approving the PO */
9
- chanceForPoApproval: (po_id: string, po_no: string, name: string) => INotificationTemplate;
10
- /** For Vendor when company approves and sends the PO to vendor */
11
- poRequestToVendor(po_no: string, company_trade_name: string, po_id: string): INotificationTemplate;
12
- /** For Company when vendor accepts PO */
13
- poAcceptanceByVendor(po_no: string, vendor_trade_name: string, po_id: string): INotificationTemplate;
14
- /** For Company when vendor rejects PO */
15
- poRejectedByVendor(po_no: string, vendor_trade_name: string, po_id: string): INotificationTemplate;
16
- };
@@ -1,56 +1 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PO_NOTIFICATIONS = void 0;
4
- const companyRoutes_constants_1 = require("../../constants/companyRoutes.constants");
5
- const vendorRoutes_constants_1 = require("../../constants/vendorRoutes.constants");
6
- exports.PO_NOTIFICATIONS = {
7
- /** For company users who belong to same purchase location as PO,
8
- * to send the PO to vendors as it has been approved */
9
- poApproved: (po_id, po_no) => {
10
- return {
11
- action_link: companyRoutes_constants_1.companyNavConfig.purchase.po.view.route(po_id),
12
- description: `${po_no} has been approved and is ready to send to the vendors`,
13
- title: `Send ${po_no} to vendor`,
14
- };
15
- },
16
- /** For company user who precceds the rejecting user*/
17
- poRejection: (po_id, po_no, rejectedBy) => {
18
- return {
19
- action_link: companyRoutes_constants_1.companyNavConfig.purchase.po.view.route(po_id),
20
- description: `PO ${po_no} has been rejeted by ${rejectedBy}.`,
21
- title: `PO ${po_no} rejected`,
22
- };
23
- },
24
- /** For Company users whose chance is for approving the PO */
25
- chanceForPoApproval: (po_id, po_no, name) => {
26
- return {
27
- action_link: companyRoutes_constants_1.companyNavConfig.purchase.po.view.route(po_id),
28
- description: `${name} requested for approval on ${po_no}`,
29
- title: ` Approve ${po_no}`,
30
- };
31
- },
32
- /** For Vendor when company approves and sends the PO to vendor */
33
- poRequestToVendor(po_no, company_trade_name, po_id) {
34
- return {
35
- title: "PO Received",
36
- description: `Received PO ${po_no} from ${company_trade_name}`,
37
- action_link: vendorRoutes_constants_1.vendorNavRoutes.purchase.po.view(po_id),
38
- };
39
- },
40
- /** For Company when vendor accepts PO */
41
- poAcceptanceByVendor(po_no, vendor_trade_name, po_id) {
42
- return {
43
- title: "PO was accepted",
44
- description: `${vendor_trade_name} accepted PO ${po_no}`,
45
- action_link: companyRoutes_constants_1.companyNavConfig.purchase.po.view.route(po_id),
46
- };
47
- },
48
- /** For Company when vendor rejects PO */
49
- poRejectedByVendor(po_no, vendor_trade_name, po_id) {
50
- return {
51
- title: "PO was rejected",
52
- description: `${vendor_trade_name} rejected PO ${po_no}`,
53
- action_link: companyRoutes_constants_1.companyNavConfig.purchase.po.view.route(po_id),
54
- };
55
- },
56
- };
@@ -15,6 +15,7 @@ export declare enum ApprovalAction {
15
15
  APPROVED = "APPROVED",
16
16
  REJECTED = "REJECTED",
17
17
  CANCELLED = "CANCELLED",
18
+ SKIPPED = "SKIPPED",
18
19
  PENDING = "PENDING" /**For user whose approval was rejected by the user next in the approval config */
19
20
  }
20
21
  export declare enum ApprovalConfigInlcude {
@@ -17,6 +17,7 @@ var ApprovalAction;
17
17
  ApprovalAction["APPROVED"] = "APPROVED";
18
18
  ApprovalAction["REJECTED"] = "REJECTED";
19
19
  ApprovalAction["CANCELLED"] = "CANCELLED";
20
+ ApprovalAction["SKIPPED"] = "SKIPPED";
20
21
  ApprovalAction["PENDING"] = "PENDING"; /**For user whose approval was rejected by the user next in the approval config */
21
22
  })(ApprovalAction || (exports.ApprovalAction = ApprovalAction = {}));
22
23
  var ApprovalConfigInlcude;
@@ -34,6 +34,7 @@ export interface IEntityApprovalChainEntry {
34
34
  message: string;
35
35
  rejection_remark: string | null;
36
36
  chain_entry_id: string;
37
+ is_from_root_template: boolean;
37
38
  indent_id?: string;
38
39
  mi_id?: string;
39
40
  pr_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "9.11.2",
3
+ "version": "9.12.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",