shareneus 1.4.45 → 1.4.47

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.
@@ -12,76 +12,13 @@ const differenceInDays_1 = __importDefault(require("date-fns/differenceInDays"))
12
12
  const date_fns_tz_1 = require("date-fns-tz");
13
13
  class MyDate {
14
14
  static GetDateTimeNowInUTC() {
15
- // const utcDate = zonedTimeToUtc(new Date(), this.UserTimeZone);
16
- // return utcDate.toISOString();
17
15
  const utcDate = (0, date_fns_tz_1.utcToZonedTime)(new Date(), this.UserTimeZone);
18
16
  return (0, date_fns_tz_1.zonedTimeToUtc)(utcDate, this.UserTimeZone);
19
17
  }
20
- // static GetDateTimeNowInUserTZ() {
21
- // // const utcDate = zonedTimeToUtc(new Date(), this.UserTimeZone);
22
- // // return utcDate.toISOString();
23
- // return zonedTimeToUtc(this.GetDateTimeNowInUTC(), this.UserTimeZone);
24
- // }
25
- // static CheckUTCDiff(arg1UTC: any, arg2UTC: any) {
26
- // return differenceInMilliseconds(new Date(arg1UTC), new Date(arg2UTC));
27
- // }
28
- // static ConvertUTCDateToUserTZ(UTCDateTime: any) {
29
- // if (TrUtils.IsEmpty(UTCDateTime)) {
30
- // return null;
31
- // }
32
- // let utcDate: any = utcToZonedTime(new Date(UTCDateTime), this.UserTimeZone);
33
- // let converteddate: any = format(new Date(utcDate), 'yyyy-MM-dd');
34
- // return converteddate;
35
- // }
36
- // static IsArg1DateBeforeArg2Date(arg1UTCDate: any, arg2UTCDate: any) {
37
- // if (TrUtils.IsEmpty(arg1UTCDate) || TrUtils.IsEmpty(arg2UTCDate)) {
38
- // return false;
39
- // }
40
- // return isBefore(new Date(this.GetEndOfArgDay(arg1UTCDate)), new Date(this.GetEndOfArgDay(arg2UTCDate)));
41
- // }
42
- // static IsArg1DateBeforeArg2Month(arg1UTCDate: any) {
43
- // if (TrUtils.IsEmpty(arg1UTCDate)) {
44
- // return false;
45
- // }
46
- // return isBefore(new Date(arg1UTCDate), new Date(this.GetStartOfMonth()));
47
- // }
48
- // static IsArg1DateAndArg2DateSame(arg1UTCDate: any, arg2UTCDate: any) {
49
- // if (TrUtils.IsEmpty(
50
- // arg1UTCDate) || TrUtils.IsEmpty(arg2UTCDate)) {
51
- // return false;
52
- // }
53
- // return isEqual(new Date(arg1UTCDate), new Date(arg2UTCDate));
54
- // }
55
- // static AddToGivenDate(UTCDateTime: any, IncrementCount: any, IncrementType: any) {
56
- // if (TrUtils.IsEmpty(UTCDateTime)) {
57
- // return null;
58
- // }
59
- // return add(new Date(UTCDateTime), {
60
- // [IncrementType]: IncrementCount
61
- // });
62
- // }
63
- // static SubtractToGivenDate(UTCDateTime: any, DecrementCount: any, DecrementType: any) {
64
- // if (TrUtils.IsEmpty(UTCDateTime)) {
65
- // return null;
66
- // }
67
- // return sub(new Date(UTCDateTime), { [DecrementType]: DecrementCount });
68
- // }
69
- // static GetUTCDateOfMonthStart() {
70
- // let year: any = getYear(new Date(this.GetDateTimeNowInUTC()));
71
- // let month: any = getMonth(new Date(this.GetDateTimeNowInUTC()));
72
- // return zonedTimeToUtc(new Date(year, month), this.UserTimeZone);
73
- // }
74
- // static GetUTCDateOfYearStart() {
75
- // return zonedTimeToUtc(startOfYear(new Date(this.GetDateTimeNowInUTC())), this.UserTimeZone);
76
- // }
77
18
  static GetCurrentYear() {
78
19
  const utcDate = (0, date_fns_tz_1.zonedTimeToUtc)(new Date(), this.UserTimeZone);
79
20
  return (0, getYear_1.default)(utcDate);
80
21
  }
81
- // static GetYearFromUTCDate(UTCDateTime: any) {
82
- // const utcDate: any = zonedTimeToUtc(new Date(UTCDateTime), this.UserTimeZone);
83
- // return getYear(utcDate);
84
- // }
85
22
  static ConvertUTCDateToReadable(UTCDateTime) {
86
23
  if (tr_utils_1.TrUtils.IsEmpty(UTCDateTime)) {
87
24
  return null;
@@ -111,7 +48,6 @@ class MyDate {
111
48
  if (tr_utils_1.TrUtils.IsEmpty(UTCDateTime)) {
112
49
  return null;
113
50
  }
114
- // console.log(UTCDateTime, this.UserTimeZone);
115
51
  const utcDate = (0, date_fns_tz_1.utcToZonedTime)(new Date(UTCDateTime), this.UserTimeZone);
116
52
  let Month = (0, format_1.default)(new Date(utcDate), 'MMM');
117
53
  let Day = (0, format_1.default)(new Date(utcDate), 'dd');
@@ -122,118 +58,16 @@ class MyDate {
122
58
  let strTime = hours + ':' + minutes + ' ' + ampm;
123
59
  return Day + '-' + Month + '-' + Year + ', ' + strTime;
124
60
  }
125
- // static ConvertUTCToReadable(UTCDateTime: any) {
126
- // if (TrUtils.IsEmpty(UTCDateTime)) {
127
- // return null;
128
- // }
129
- // const utcDate: any = utcToZonedTime(new Date(UTCDateTime), this.UserTimeZone);
130
- // let Month: any = format(new Date(utcDate), 'MMM');
131
- // let Day: any = format(new Date(utcDate), 'dd');
132
- // let Year: any = format(new Date(utcDate), 'yyyy');
133
- // let hours: any = format(new Date(utcDate), 'hh');
134
- // let minutes: any = format(new Date(utcDate), 'mm');
135
- // let seconds: any = format(new Date(utcDate), 'ss');
136
- // let ampm: any = format(new Date(utcDate), 'a');
137
- // let strTime: any = hours + ':' + minutes + ':' + seconds + ' ' + ampm;
138
- // return Day + '-' + Month + '-' + Year + ' , ' + strTime;
139
- // }
140
- // static ConvertUTCDateTimeToTime(UTCDateTime: any) {
141
- // if (TrUtils.IsEmpty(UTCDateTime)) {
142
- // return null;
143
- // }
144
- // const utcDate: any = utcToZonedTime(new Date(UTCDateTime), this.UserTimeZone);
145
- // let hours: any = format(new Date(utcDate), 'hh');
146
- // let minutes: any = format(new Date(utcDate), 'mm');
147
- // let ampm: any = format(new Date(utcDate), 'a');
148
- // let strTime: any = hours + ':' + minutes + ' ' + ampm;
149
- // return strTime;
150
- // }
151
- // static GetHourNow() {
152
- // const utcDate: any = utcToZonedTime(new Date(), this.UserTimeZone);
153
- // return getHours(utcDate);
154
- // }
155
- // static GetHourFromUTCDateTime(UTCDateTime: any) {
156
- // if (TrUtils.IsEmpty(UTCDateTime)) {
157
- // return null;
158
- // }
159
- // const utcDate: any = utcToZonedTime(new Date(UTCDateTime), this.UserTimeZone);
160
- // return getHours(utcDate);
161
- // }
162
- // static GetMinutesFromUTCDateTime(UTCDateTime: any) {
163
- // if (TrUtils.IsEmpty(UTCDateTime)) {
164
- // return null;
165
- // }
166
- // const utcDate: any = utcToZonedTime(new Date(UTCDateTime), this.UserTimeZone);
167
- // return getMinutes(utcDate);
168
- // }
169
- // static SetHourAndMinutes(UTCDateTime: any, Hours: any, Minutes: any) {
170
- // if (TrUtils.IsEmpty(UTCDateTime)) {
171
- // return null;
172
- // }
173
- // UTCDateTime = setHours(new Date(UTCDateTime), Hours);
174
- // UTCDateTime = setMinutes(new Date(UTCDateTime), Minutes);
175
- // return zonedTimeToUtc(UTCDateTime, this.UserTimeZone);
176
- // }
177
61
  static GetMonthName(MonthNumber) {
178
62
  let utcDate = this.GetDateTimeNowInUTC();
179
63
  utcDate = (0, setMonth_1.default)(utcDate, (MonthNumber - 1));
180
64
  let MonthName = (0, format_1.default)(new Date(utcDate), 'MMMM');
181
65
  return MonthName;
182
66
  }
183
- // static ConvertUserTZToUTC(selectedDate: any, time: any) {
184
- // // console.log(selectedDate,this.UserTimeZone, new Date(selectedDate));
185
- // if (TrUtils.IsEmpty(selectedDate)) {
186
- // return null;
187
- // }
188
- // const utcDate = utcToZonedTime(new Date(selectedDate), this.UserTimeZone);
189
- // // console.log(utcDate);
190
- // let year: any = getYear(utcDate);
191
- // let month: any = getMonth(utcDate);
192
- // let Day: any = getDate(utcDate);
193
- // if (month < 10) {
194
- // month = month + 1;
195
- // if (month < 10) {
196
- // month = '0' + month;
197
- // }
198
- // } else {
199
- // month = month + 1;
200
- // }
201
- // if (Day < 10) {
202
- // Day = '0' + Day;
203
- // }
204
- // let date: any = year + '-' + month + '-' + Day;
205
- // if (TrUtils.IsEmpty(time)) {
206
- // const utcDate = utcToZonedTime(new Date(), this.UserTimeZone);
207
- // // console.log(utcDate);
208
- // time = format(new Date(utcDate), 'HH:mm:ss.SSS');
209
- // // console.log('time', time);
210
- // }
211
- // var a = zonedTimeToUtc(date + ' ' + time, this.UserTimeZone);
212
- // var selectedDateTime = a.toISOString();
213
- // // console.log(selectedDateTime);
214
- // return selectedDateTime;
215
- // }
216
- // static GetLastDayOfMonth() {
217
- // return zonedTimeToUtc(endOfMonth(new Date()), this.UserTimeZone);
218
- // }
219
- // static GetStartAndEndDateMonthAndYear(year: any, month: any) {
220
- // var startDate: any = zonedTimeToUtc(new Date(year, month), this.UserTimeZone);
221
- // var endDate: any = zonedTimeToUtc(endOfMonth(new Date(year, month)), this.UserTimeZone);
222
- // return [startDate, endDate];
223
- // }
224
- // static GetMinutesDiffBetween(startutcdate: any, endutcdate: any) {
225
- // if (TrUtils.IsEmpty(startutcdate) || TrUtils.IsEmpty(endutcdate)) {
226
- // return 0;
227
- // }
228
- // return differenceInMinutes(new Date(endutcdate), new Date(startutcdate));
229
- // }
230
67
  static GetDaysDiffBetween(startutcdate, endutcdate) {
231
68
  if (tr_utils_1.TrUtils.IsEmpty(startutcdate) || tr_utils_1.TrUtils.IsEmpty(endutcdate)) {
232
69
  return 0;
233
70
  }
234
- // var start = moment(startutcdate, 'YYYY-MM-DD');
235
- // var end = moment(endutcdate, 'YYYY-MM-DD');
236
- // return end.diff(start, 'days');
237
71
  return (0, differenceInDays_1.default)(new Date(endutcdate), new Date(startutcdate));
238
72
  }
239
73
  static GetWeekDateAndTime(UTCDateTime) {
@@ -5,36 +5,13 @@ export declare class TrUtils {
5
5
  static IsZero(Value: any): boolean;
6
6
  static IsFixedZero(Value: any): boolean;
7
7
  static Stringify(RecordData: any): any;
8
- static CombineProductDetails(product: any): string;
9
- static GetProductRegistrationNo(product: any): any;
10
- static GetEquipmentModel(product: any): string;
11
- static GetEquipmentSerialNo(equipment: any): any;
12
8
  static ConcatObjects(obj1: any, obj2: any): any;
13
9
  static ConvertPercToVal(Discount: any, Total: any): number | null;
14
- static ConvertMinsToHour(Mins: any): any;
15
- static ConvertHourToMin(HrsData: any): any;
16
10
  static FixedTo(value: any): number;
17
11
  static FixPriceValue(Value: any): string;
18
- static ConvertValToPerc(Discount: number, Total: number): number | null;
19
- static CheckARIndividualStatusValid(Part: any, Field: any): boolean;
20
- static CheckARIndividualStatusApproved(Part: any, Field: any): boolean;
21
- static CheckARIndividualStatusCompleted(Part: any, Field: any): boolean;
22
- static CheckAndUnsubscribeSubject(Subject: any): void;
23
12
  static SetValueToZeroIfNull(Value: any): any;
24
13
  static SetPercToStringIfNull(Value: any): any;
25
14
  static SetPercToTrueIfNull(Value: any): any;
26
15
  static CheckInvalidSelect(Value: any): boolean;
27
- static DateSorting(date1: any, date2: any): any;
28
- static DateSortingMonthandYear(date1: any, date2: any): any;
29
- static InvoiceIdSorting(data1: any, data2: any): any;
30
- static IdSorting(id: any, data1: any, data2: any): any;
31
- static GridNumberSorting(num1: any, num2: any): any;
32
- static AlphabetSorter(argDatalist: any, Identifier: any): any;
33
- static ArrayAlphabetSorting(SortingList: any): any;
34
- static GetHours(hour: any, isPM: any): any;
35
16
  static isTaxable(tax: string): boolean;
36
- static IsItemFromEstimate(ItemId: string): boolean;
37
- static IsItemInsurance(PayBy: string): boolean;
38
- static GetMonthsArray(): any[];
39
- static GetDurationInHrsAndMins(duration: number): string;
40
17
  }
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TrUtils = void 0;
4
- // import { HttpClient } from '@angular/common/http';
5
- const enums_1 = require("../enums/enums");
6
- // import { LaborStatusEnum } from '../enums/enums';
7
4
  class TrUtils {
8
5
  static IsNull(Value) {
9
6
  return Value === null || typeof Value === 'undefined';
@@ -24,28 +21,6 @@ class TrUtils {
24
21
  let StringifiedResult = JSON.parse(JSON.stringify(RecordData));
25
22
  return StringifiedResult;
26
23
  }
27
- static CombineProductDetails(product) {
28
- return product.Model + ' ' + product.Year + ' ' + product.Var;
29
- }
30
- static GetProductRegistrationNo(product) {
31
- if (!this.IsNull(product)) {
32
- return product.RegNo;
33
- }
34
- else {
35
- return null;
36
- }
37
- }
38
- static GetEquipmentModel(product) {
39
- return product.Make + ' ' + product.Model;
40
- }
41
- static GetEquipmentSerialNo(equipment) {
42
- if (!this.IsNull(equipment)) {
43
- return equipment.SNo;
44
- }
45
- else {
46
- return null;
47
- }
48
- }
49
24
  static ConcatObjects(obj1, obj2) {
50
25
  // tslint:disable-next-line:forin
51
26
  for (let key in obj2) {
@@ -71,22 +46,6 @@ class TrUtils {
71
46
  return value;
72
47
  }
73
48
  }
74
- static ConvertMinsToHour(Mins) {
75
- let Num;
76
- Mins = Number(Mins);
77
- let Hrs = Mins / 60;
78
- Num = this.FixedTo(Hrs);
79
- return Num;
80
- }
81
- static ConvertHourToMin(HrsData) {
82
- let Time = {};
83
- if (!TrUtils.IsNull(HrsData)) {
84
- // tslint:disable-next-line:radix
85
- Time['Hrs'] = parseInt(HrsData.toString().split('.')[0]);
86
- Time['Mins'] = (HrsData * 60) % 60;
87
- }
88
- return Time;
89
- }
90
49
  static FixedTo(value) {
91
50
  if (this.IsNull(value)) {
92
51
  value = 0;
@@ -105,54 +64,6 @@ class TrUtils {
105
64
  let Result = Value.toFixed(this.DecimalsNumber);
106
65
  return Result;
107
66
  }
108
- static ConvertValToPerc(Discount, Total) {
109
- if (this.IsNull(Total)) {
110
- return null;
111
- }
112
- else {
113
- if (this.IsNull(Discount)) {
114
- Discount = 0;
115
- }
116
- if (this.IsNull(Total)) {
117
- Total = 0;
118
- }
119
- let value = this.FixedTo(((Discount * 100) / Total));
120
- if (isNaN(value)) {
121
- value = 0;
122
- }
123
- return value;
124
- }
125
- }
126
- static CheckARIndividualStatusValid(Part, Field) {
127
- if (Part.Ind[Field] === enums_1.LaborStatusEnum.Cancelled || Part.Ind[Field] === enums_1.LaborStatusEnum.Declined) {
128
- return false;
129
- }
130
- else {
131
- return true;
132
- }
133
- }
134
- static CheckARIndividualStatusApproved(Part, Field) {
135
- if (Part.Ind[Field] !== enums_1.LaborStatusEnum.New && Part.Ind[Field] !== enums_1.LaborStatusEnum.WtngForAppr &&
136
- this.CheckARIndividualStatusValid(Part, Field)) {
137
- return true;
138
- }
139
- else {
140
- return false;
141
- }
142
- }
143
- static CheckARIndividualStatusCompleted(Part, Field) {
144
- if (Part.Ind[Field] === enums_1.LaborStatusEnum.Completed) {
145
- return true;
146
- }
147
- else {
148
- return false;
149
- }
150
- }
151
- static CheckAndUnsubscribeSubject(Subject) {
152
- if (!this.IsNull(Subject)) {
153
- Subject.unsubscribe();
154
- }
155
- }
156
67
  static SetValueToZeroIfNull(Value) {
157
68
  if (this.IsNull(Value)) {
158
69
  Value = 0;
@@ -174,177 +85,9 @@ class TrUtils {
174
85
  static CheckInvalidSelect(Value) {
175
86
  return Value === null || typeof Value === 'undefined' || Value === '' || Value === -1 || Value === '-1';
176
87
  }
177
- static DateSorting(date1, date2) {
178
- if (TrUtils.IsEmpty(date1) && TrUtils.IsEmpty(date2)) {
179
- return 0;
180
- }
181
- if (TrUtils.IsEmpty(date1)) {
182
- return -1;
183
- }
184
- if (TrUtils.IsEmpty(date2)) {
185
- return 1;
186
- }
187
- let Date1 = date1.split('-');
188
- let Date2 = date2.split('-');
189
- let year1 = Number(Date1[2]);
190
- let day1 = Number(Date1[0]);
191
- let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
192
- let month1 = months.indexOf(Date1[1]);
193
- let year2 = Number(Date2[2]);
194
- let day2 = Number(Date2[0]);
195
- let month2 = months.indexOf(Date2[1]);
196
- let result1 = (year1 * 10000) + (month1 * 100) + day1;
197
- let result2 = (year2 * 10000) + (month2 * 100) + day2;
198
- let result = result1 - result2;
199
- return result;
200
- }
201
- static DateSortingMonthandYear(date1, date2) {
202
- if (TrUtils.IsEmpty(date1) && TrUtils.IsEmpty(date2)) {
203
- return 0;
204
- }
205
- if (TrUtils.IsEmpty(date1)) {
206
- return -1;
207
- }
208
- if (TrUtils.IsEmpty(date2)) {
209
- return 1;
210
- }
211
- let Date1 = date1.split('/');
212
- let Date2 = date2.split('/');
213
- let year1 = Number(Date1[1]);
214
- // let day1 = Number(Date1[0]);
215
- let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
216
- let month1 = months.indexOf(Date1[0]);
217
- let year2 = Number(Date2[1]);
218
- // let day2 = Number(Date2[0]);
219
- let month2 = months.indexOf(Date2[0]);
220
- let result1 = (year1 * 10000) + (month1 * 100);
221
- let result2 = (year2 * 10000) + (month2 * 100);
222
- let result = result1 - result2;
223
- return result;
224
- }
225
- static InvoiceIdSorting(data1, data2) {
226
- if (!this.IsEmpty(data1) && !this.IsEmpty(data2)) {
227
- let Data1 = data1.split('I');
228
- let Data2 = data2.split('I');
229
- return this.GridNumberSorting(Data1[1], Data2[1]);
230
- }
231
- else {
232
- return 0;
233
- }
234
- }
235
- static IdSorting(id, data1, data2) {
236
- if (!this.IsEmpty(data1) && !this.IsEmpty(data2) && data1.includes(id) && data2.includes(id)) {
237
- let Data1 = data1.split(id);
238
- let Data2 = data2.split(id);
239
- return this.GridNumberSorting(Data1[1], Data2[1]);
240
- }
241
- else {
242
- return this.GridNumberSorting(data1, data2);
243
- ;
244
- }
245
- }
246
- static GridNumberSorting(num1, num2) {
247
- let result = Number(num1) - Number(num2);
248
- return result;
249
- }
250
- static AlphabetSorter(argDatalist, Identifier) {
251
- let argList = TrUtils.Stringify(argDatalist);
252
- argList.sort(function (a, b) {
253
- var _a, _b, _c, _d;
254
- // tslint:disable-next-line:curly
255
- if (TrUtils.IsNull(a[Identifier])) {
256
- a[Identifier] = '';
257
- }
258
- if (TrUtils.IsNull(b[Identifier])) {
259
- b[Identifier] = '';
260
- }
261
- if (((_a = a[Identifier]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) < ((_b = b[Identifier]) === null || _b === void 0 ? void 0 : _b.toLowerCase()))
262
- return -1;
263
- // tslint:disable-next-line:curly
264
- if (((_c = a[Identifier]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) > ((_d = b[Identifier]) === null || _d === void 0 ? void 0 : _d.toLowerCase()))
265
- return 1;
266
- return 0;
267
- });
268
- return argList;
269
- }
270
- static ArrayAlphabetSorting(SortingList) {
271
- SortingList.sort((a, b) => {
272
- let fa = a.Name.toLowerCase(), fb = b.Name.toLowerCase();
273
- if (fa < fb) {
274
- return -1;
275
- }
276
- if (fa > fb) {
277
- return 1;
278
- }
279
- return 0;
280
- });
281
- return SortingList;
282
- }
283
- static GetHours(hour, isPM) {
284
- if (isPM === 'PM') {
285
- let Amhours = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'];
286
- let Pmhours = ['13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];
287
- if (hour >= 12) {
288
- let Index = Pmhours.findIndex((val) => {
289
- return val === hour.toString();
290
- });
291
- return (Index === -1) ? '12' : Amhours[Index];
292
- }
293
- else {
294
- let Index = Amhours.findIndex((val) => {
295
- return val === hour.toString();
296
- });
297
- return (Index === -1) ? '12' : Pmhours[Index];
298
- }
299
- }
300
- else {
301
- return hour === '12' ? '0' : hour.toString();
302
- }
303
- }
304
88
  static isTaxable(tax) {
305
89
  return (tax === 'TI') ? true : false;
306
90
  }
307
- static IsItemFromEstimate(ItemId) {
308
- return !TrUtils.IsNull(ItemId) && (ItemId.split('E').length === 2);
309
- }
310
- static IsItemInsurance(PayBy) {
311
- return PayBy === enums_1.PayTypeEnum.Insurance || PayBy === enums_1.PayTypeEnum.Shared;
312
- }
313
- static GetMonthsArray() {
314
- let MonthName = new Array();
315
- MonthName[0] = 'Jan';
316
- MonthName[1] = 'Feb';
317
- MonthName[2] = 'Mar';
318
- MonthName[3] = 'Apr';
319
- MonthName[4] = 'May';
320
- MonthName[5] = 'Jun';
321
- MonthName[6] = 'Jul';
322
- MonthName[7] = 'Aug';
323
- MonthName[8] = 'Sept';
324
- MonthName[9] = 'Oct';
325
- MonthName[10] = 'Nov';
326
- MonthName[11] = 'Dec';
327
- return MonthName;
328
- }
329
- static GetDurationInHrsAndMins(duration) {
330
- let Durationhr = Math.floor(duration / 60);
331
- let Durationmin = duration % 60;
332
- if (Durationhr === 0 && Durationmin === 0) {
333
- return '-';
334
- }
335
- else {
336
- let DurationInfo = '';
337
- if (Durationhr !== 0) {
338
- DurationInfo = Durationhr + ' hrs';
339
- }
340
- if (Durationmin !== 0) {
341
- DurationInfo = DurationInfo + ' ' + Durationmin + ' mins';
342
- }
343
- return DurationInfo;
344
- }
345
- }
346
91
  }
347
92
  exports.TrUtils = TrUtils;
348
- // static laborEndPointAddress: string = 'https://b4721cf2655e.ngrok.io/';
349
- // static laborEndPointAddress: string = 'http://localhost:9000/';
350
93
  TrUtils.DecimalsNumber = 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.45",
3
+ "version": "1.4.47",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",