hl-core 0.0.10-beta.38 → 0.0.10-beta.39

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.
@@ -89,6 +89,29 @@ export const reformatDate = (date: string) => {
89
89
  }
90
90
  };
91
91
 
92
+ export const reformatDateWithHours = (date: string) => {
93
+ if (date) {
94
+ const data = new Date(date);
95
+ let day: string | number = data.getDate();
96
+ let month: string | number = data.getMonth() + 1;
97
+ let hour: string | number = data.getHours();
98
+ let minute: string | number = data.getMinutes();
99
+ if (month < 10) {
100
+ month = '0' + month;
101
+ }
102
+ if (day < 10) {
103
+ day = '0' + day;
104
+ }
105
+ if (minute < 10) {
106
+ minute = '0' + minute;
107
+ }
108
+ const year = data.getFullYear();
109
+ return `${day}.${month}.${year} - ${hour}:${minute}`;
110
+ } else {
111
+ return null;
112
+ }
113
+ };
114
+
92
115
  export const reformatIin = (iin: string) => {
93
116
  if (!!iin) {
94
117
  const matched = iin.match(/.{1,3}/g);
@@ -818,6 +841,9 @@ export class RoleController {
818
841
  isUrsp = () => {
819
842
  return this.isRole(constants.roles.URSP);
820
843
  };
844
+ isArchivist = () => {
845
+ return this.isRole(constants.roles.Archivist);
846
+ };
821
847
  hasAccess = () => {
822
848
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
823
849
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.38",
3
+ "version": "0.0.10-beta.39",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
package/types/enum.ts CHANGED
@@ -117,6 +117,7 @@ export enum Roles {
117
117
  ManagerAuletti = 'ManagerAuletti',
118
118
  HeadOfDso = 'HeadOfDso',
119
119
  URSP = 'URSP',
120
+ Archivist = 'Archivist',
120
121
  }
121
122
 
122
123
  export enum Statuses {