@banch0u/core-project-test-repository 1.2.1 → 1.2.2

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.
@@ -50,9 +50,41 @@ var succesMessage = exports.succesMessage = function succesMessage(value) {
50
50
  };
51
51
  var infoMessageBottomRight = exports.infoMessageBottomRight = function infoMessageBottomRight(value) {
52
52
  playNotificationSound();
53
+ var projects = ["", "Sənəd dövriyyəsi", "Kadrlar sistemi", "Müqavilələr", "Şəxsi kabinet"];
54
+ var parsedValue;
55
+ try {
56
+ parsedValue = JSON.parse(value);
57
+ } catch (e) {
58
+ console.error('Failed to parse notification value:', e);
59
+ parsedValue = {
60
+ Text: value || "Bildiriş"
61
+ };
62
+ }
63
+ var handleClick = function handleClick() {
64
+ switch (parsedValue.Project) {
65
+ case 1:
66
+ window.location = "".concat(window.location.origin, "/docflow/document-circulation/unread-docs");
67
+ break;
68
+ case 2:
69
+ window.location = "".concat(window.location.origin, "/hr/hr");
70
+ break;
71
+ case 3:
72
+ window.location = "".concat(window.location.origin, "/contracts/unread-contract");
73
+ break;
74
+ case 4:
75
+ window.location = "".concat(window.location.origin, "/accounts/private");
76
+ break;
77
+ default:
78
+ break;
79
+ }
80
+ };
53
81
  return _antd.notification.info({
54
- message: "Yeni bildiriş",
55
- description: value || "Bildiriş",
56
- placement: "bottomRight"
82
+ message: projects[parsedValue.Project],
83
+ description: parsedValue.Text || "Bildiriş",
84
+ placement: "bottomRight",
85
+ onClick: handleClick,
86
+ style: {
87
+ cursor: "pointer"
88
+ }
57
89
  });
58
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banch0u/core-project-test-repository",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Shared core features for all projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [