cyc-type-def 6.5.0 → 7.0.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.
- package/dist/index.cjs +154 -6
- package/dist/index.d.cts +7 -11
- package/dist/index.d.ts +7 -11
- package/dist/index.js +154 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -257,6 +257,18 @@ var AttSheep = class {
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
var DisplayAttendance = class {
|
|
260
|
+
// Allows dynamic string keys
|
|
261
|
+
cntOM;
|
|
262
|
+
cntNB;
|
|
263
|
+
cntAC;
|
|
264
|
+
cntNF;
|
|
265
|
+
cntRNF;
|
|
266
|
+
desOM;
|
|
267
|
+
desNB;
|
|
268
|
+
desAC;
|
|
269
|
+
desNF;
|
|
270
|
+
desRNF;
|
|
271
|
+
total;
|
|
260
272
|
calcTotal() {
|
|
261
273
|
this.total = this.cntOM + this.cntNB + this.cntAC + this.cntNF + this.cntRNF;
|
|
262
274
|
}
|
|
@@ -412,13 +424,15 @@ var Session = class {
|
|
|
412
424
|
|
|
413
425
|
// src/classes/attendance/Title.ts
|
|
414
426
|
var Title = class {
|
|
415
|
-
getKey() {
|
|
416
|
-
return "dddd";
|
|
417
|
-
}
|
|
418
427
|
};
|
|
419
428
|
|
|
420
429
|
// src/classes/helper/DateEvent.ts
|
|
421
430
|
var DateEvent = class {
|
|
431
|
+
datetime;
|
|
432
|
+
precision;
|
|
433
|
+
eventName;
|
|
434
|
+
invitedBy;
|
|
435
|
+
remark;
|
|
422
436
|
constructor(datetime) {
|
|
423
437
|
if (datetime) this.datetime = datetime;
|
|
424
438
|
this.precision = "DAY" /* DAY */;
|
|
@@ -435,6 +449,54 @@ var DatePrecision = /* @__PURE__ */ ((DatePrecision2) => {
|
|
|
435
449
|
|
|
436
450
|
// src/classes/pastoral-team/Sheep.ts
|
|
437
451
|
var Sheep = class _Sheep {
|
|
452
|
+
// pastoral team info
|
|
453
|
+
st;
|
|
454
|
+
// small team id
|
|
455
|
+
cluster;
|
|
456
|
+
// cluster id
|
|
457
|
+
cg;
|
|
458
|
+
// cg id
|
|
459
|
+
status;
|
|
460
|
+
discipler;
|
|
461
|
+
// history record (spiritual journey/milestone)
|
|
462
|
+
/** first approach/contact (JieChu) */
|
|
463
|
+
firstApproach;
|
|
464
|
+
/** first CG/SERVICE */
|
|
465
|
+
firstAtt;
|
|
466
|
+
/** accept Christ */
|
|
467
|
+
acceptChrist;
|
|
468
|
+
// sheep info
|
|
469
|
+
name;
|
|
470
|
+
age;
|
|
471
|
+
birthday;
|
|
472
|
+
isBaptised;
|
|
473
|
+
dtBaptism;
|
|
474
|
+
contact;
|
|
475
|
+
gender;
|
|
476
|
+
nric;
|
|
477
|
+
address;
|
|
478
|
+
// in future might break to details like address line 1, state etc.
|
|
479
|
+
// attendance
|
|
480
|
+
attCnt;
|
|
481
|
+
/** Attendance count in recent 15 weeks (tentatively) */
|
|
482
|
+
recentAttCnt;
|
|
483
|
+
hideAtt;
|
|
484
|
+
// hide in attendance list
|
|
485
|
+
// ???
|
|
486
|
+
show;
|
|
487
|
+
// show in msj-progress-tracker
|
|
488
|
+
// base attributes
|
|
489
|
+
id;
|
|
490
|
+
deleted;
|
|
491
|
+
createdAt;
|
|
492
|
+
createdBy;
|
|
493
|
+
updatedAt;
|
|
494
|
+
updatedBy;
|
|
495
|
+
remark;
|
|
496
|
+
// not submit attributes
|
|
497
|
+
arrFlwUpCnt;
|
|
498
|
+
msj;
|
|
499
|
+
msjRecords;
|
|
438
500
|
constructor(id, name, status, cg, st, cluster, deleted, show, attCnt) {
|
|
439
501
|
this.id = id;
|
|
440
502
|
this.name = name;
|
|
@@ -456,6 +518,7 @@ var Sheep = class _Sheep {
|
|
|
456
518
|
|
|
457
519
|
// src/classes/attendance-report/ReportSheep.ts
|
|
458
520
|
var ReportSheep = class extends Sheep {
|
|
521
|
+
attMap;
|
|
459
522
|
constructor(sheep) {
|
|
460
523
|
super(
|
|
461
524
|
sheep.id,
|
|
@@ -475,6 +538,9 @@ var ReportSheep = class extends Sheep {
|
|
|
475
538
|
|
|
476
539
|
// src/classes/attendance-report/TitleAttendance.ts
|
|
477
540
|
var TitleAttendance = class {
|
|
541
|
+
cgAtt;
|
|
542
|
+
serviceAtt;
|
|
543
|
+
title;
|
|
478
544
|
constructor(cgAtt, serviceAtt, title) {
|
|
479
545
|
this.cgAtt = cgAtt;
|
|
480
546
|
this.serviceAtt = serviceAtt;
|
|
@@ -484,6 +550,22 @@ var TitleAttendance = class {
|
|
|
484
550
|
|
|
485
551
|
// src/classes/flw-up/FollowUpStatus.ts
|
|
486
552
|
var FollowUpStatus = class {
|
|
553
|
+
id;
|
|
554
|
+
method;
|
|
555
|
+
st;
|
|
556
|
+
// small team id
|
|
557
|
+
cluster;
|
|
558
|
+
// cluster id
|
|
559
|
+
cg;
|
|
560
|
+
// cg id
|
|
561
|
+
sheep;
|
|
562
|
+
// sheep name
|
|
563
|
+
in_list;
|
|
564
|
+
status;
|
|
565
|
+
timeStamp;
|
|
566
|
+
date;
|
|
567
|
+
discipler;
|
|
568
|
+
user;
|
|
487
569
|
constructor() {
|
|
488
570
|
this.id = "";
|
|
489
571
|
this.method = "";
|
|
@@ -501,6 +583,25 @@ var FollowUpStatus = class {
|
|
|
501
583
|
|
|
502
584
|
// src/classes/pastoral-team/CG.ts
|
|
503
585
|
var CG = class {
|
|
586
|
+
name;
|
|
587
|
+
/** small team id */
|
|
588
|
+
st;
|
|
589
|
+
//
|
|
590
|
+
/** cluster id */
|
|
591
|
+
cluster;
|
|
592
|
+
cglCnt;
|
|
593
|
+
sglCnt;
|
|
594
|
+
cglName;
|
|
595
|
+
/** row index in attendance report (1-based) */
|
|
596
|
+
rptRowIdx;
|
|
597
|
+
// base attributes
|
|
598
|
+
id;
|
|
599
|
+
deleted;
|
|
600
|
+
createdAt;
|
|
601
|
+
createdBy;
|
|
602
|
+
updatedAt;
|
|
603
|
+
updatedBy;
|
|
604
|
+
remark;
|
|
504
605
|
constructor(id, name, st, cluster, deleted) {
|
|
505
606
|
this.id = id;
|
|
506
607
|
this.name = name;
|
|
@@ -512,6 +613,14 @@ var CG = class {
|
|
|
512
613
|
|
|
513
614
|
// src/classes/pastoral-team/Cluster.ts
|
|
514
615
|
var Cluster = class {
|
|
616
|
+
id;
|
|
617
|
+
deleted;
|
|
618
|
+
name;
|
|
619
|
+
createdAt;
|
|
620
|
+
createdBy;
|
|
621
|
+
updatedAt;
|
|
622
|
+
updatedBy;
|
|
623
|
+
remark;
|
|
515
624
|
constructor(id, name, deleted) {
|
|
516
625
|
this.id = id;
|
|
517
626
|
this.name = name;
|
|
@@ -521,6 +630,18 @@ var Cluster = class {
|
|
|
521
630
|
|
|
522
631
|
// src/classes/pastoral-team/SmallTeam.ts
|
|
523
632
|
var SmallTeam = class {
|
|
633
|
+
name;
|
|
634
|
+
/** cluster id */
|
|
635
|
+
cluster;
|
|
636
|
+
// cluster id
|
|
637
|
+
// base attributes
|
|
638
|
+
id;
|
|
639
|
+
deleted;
|
|
640
|
+
createdAt;
|
|
641
|
+
createdBy;
|
|
642
|
+
updatedAt;
|
|
643
|
+
updatedBy;
|
|
644
|
+
remark;
|
|
524
645
|
constructor(id, name, cluster, deleted) {
|
|
525
646
|
this.id = id;
|
|
526
647
|
this.name = name;
|
|
@@ -531,6 +652,7 @@ var SmallTeam = class {
|
|
|
531
652
|
|
|
532
653
|
// src/classes/user-management/AssignedCG.ts
|
|
533
654
|
var AssignedCG = class {
|
|
655
|
+
cg;
|
|
534
656
|
constructor(cg) {
|
|
535
657
|
this.cg = cg;
|
|
536
658
|
}
|
|
@@ -538,18 +660,33 @@ var AssignedCG = class {
|
|
|
538
660
|
|
|
539
661
|
// src/classes/helper/Click.ts
|
|
540
662
|
var Click = class {
|
|
663
|
+
action;
|
|
664
|
+
timeStamp;
|
|
665
|
+
userId;
|
|
666
|
+
remark;
|
|
541
667
|
};
|
|
542
668
|
|
|
543
669
|
// src/classes/helper/Column.ts
|
|
544
670
|
var Column = class {
|
|
671
|
+
visible = false;
|
|
672
|
+
name;
|
|
545
673
|
constructor(name) {
|
|
546
|
-
this.visible = false;
|
|
547
674
|
this.name = name;
|
|
548
675
|
}
|
|
549
676
|
};
|
|
550
677
|
|
|
551
678
|
// src/classes/AppUser.ts
|
|
552
679
|
var AppUser = class {
|
|
680
|
+
id;
|
|
681
|
+
name;
|
|
682
|
+
/** Login id: phone number/email */
|
|
683
|
+
phoneNum;
|
|
684
|
+
permission;
|
|
685
|
+
pastoral_team;
|
|
686
|
+
permissions;
|
|
687
|
+
assigned_cg;
|
|
688
|
+
idSheep;
|
|
689
|
+
settings;
|
|
553
690
|
constructor(id, name, phoneNum, permission) {
|
|
554
691
|
this.id = id;
|
|
555
692
|
this.name = name;
|
|
@@ -563,6 +700,15 @@ var Period = class {
|
|
|
563
700
|
constructor(period) {
|
|
564
701
|
Object.assign(this, period);
|
|
565
702
|
}
|
|
703
|
+
generateId() {
|
|
704
|
+
if (!this.year) {
|
|
705
|
+
throw new Error("Cannot generate Period ID: year is required.");
|
|
706
|
+
}
|
|
707
|
+
if (!this.month) {
|
|
708
|
+
throw new Error("Cannot generate Period ID: month is required.");
|
|
709
|
+
}
|
|
710
|
+
this.id = this.year.toString() + "-" + this.month.toString().padStart(2, "0");
|
|
711
|
+
}
|
|
566
712
|
/**
|
|
567
713
|
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
568
714
|
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
@@ -577,10 +723,12 @@ var Period = class {
|
|
|
577
723
|
this.endTimestamp = end.getTime();
|
|
578
724
|
}
|
|
579
725
|
get dtStart() {
|
|
580
|
-
return new Date(this.startTimestamp);
|
|
726
|
+
if (this.startTimestamp) return new Date(this.startTimestamp);
|
|
727
|
+
else return void 0;
|
|
581
728
|
}
|
|
582
729
|
get dtEnd() {
|
|
583
|
-
return new Date(this.endTimestamp);
|
|
730
|
+
if (this.endTimestamp) return new Date(this.endTimestamp);
|
|
731
|
+
else return void 0;
|
|
584
732
|
}
|
|
585
733
|
};
|
|
586
734
|
|
package/dist/index.d.cts
CHANGED
|
@@ -197,6 +197,7 @@ declare class DisplayAttendance {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
interface Title extends Base {
|
|
200
|
+
idPeriod: string;
|
|
200
201
|
startDt: number;
|
|
201
202
|
endDt: number;
|
|
202
203
|
code: string;
|
|
@@ -204,7 +205,6 @@ interface Title extends Base {
|
|
|
204
205
|
}
|
|
205
206
|
/** represents a week */
|
|
206
207
|
declare class Title implements Title {
|
|
207
|
-
getKey(): string;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
interface Attendance extends Title {
|
|
@@ -540,19 +540,15 @@ interface BaseDialogInput {
|
|
|
540
540
|
action: DialogAction;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
-
|
|
544
|
-
id: string;
|
|
545
|
-
deleted: boolean;
|
|
546
|
-
createdAt?: number | undefined;
|
|
547
|
-
createdBy?: string | undefined;
|
|
548
|
-
updatedAt?: number | undefined;
|
|
549
|
-
updatedBy?: string | undefined;
|
|
550
|
-
remark?: string | undefined;
|
|
543
|
+
interface Period extends Base {
|
|
551
544
|
year: number;
|
|
552
545
|
month: number;
|
|
553
546
|
startTimestamp: number;
|
|
554
547
|
endTimestamp: number;
|
|
548
|
+
}
|
|
549
|
+
declare class Period implements Period {
|
|
555
550
|
constructor(period: Partial<Period>);
|
|
551
|
+
generateId(): void;
|
|
556
552
|
/**
|
|
557
553
|
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
558
554
|
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
@@ -561,8 +557,8 @@ declare class Period implements Base {
|
|
|
561
557
|
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
562
558
|
*/
|
|
563
559
|
setBounds(): void;
|
|
564
|
-
get dtStart(): Date;
|
|
565
|
-
get dtEnd(): Date;
|
|
560
|
+
get dtStart(): Date | undefined;
|
|
561
|
+
get dtEnd(): Date | undefined;
|
|
566
562
|
}
|
|
567
563
|
|
|
568
564
|
declare const METHOD: {
|
package/dist/index.d.ts
CHANGED
|
@@ -197,6 +197,7 @@ declare class DisplayAttendance {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
interface Title extends Base {
|
|
200
|
+
idPeriod: string;
|
|
200
201
|
startDt: number;
|
|
201
202
|
endDt: number;
|
|
202
203
|
code: string;
|
|
@@ -204,7 +205,6 @@ interface Title extends Base {
|
|
|
204
205
|
}
|
|
205
206
|
/** represents a week */
|
|
206
207
|
declare class Title implements Title {
|
|
207
|
-
getKey(): string;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
interface Attendance extends Title {
|
|
@@ -540,19 +540,15 @@ interface BaseDialogInput {
|
|
|
540
540
|
action: DialogAction;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
-
|
|
544
|
-
id: string;
|
|
545
|
-
deleted: boolean;
|
|
546
|
-
createdAt?: number | undefined;
|
|
547
|
-
createdBy?: string | undefined;
|
|
548
|
-
updatedAt?: number | undefined;
|
|
549
|
-
updatedBy?: string | undefined;
|
|
550
|
-
remark?: string | undefined;
|
|
543
|
+
interface Period extends Base {
|
|
551
544
|
year: number;
|
|
552
545
|
month: number;
|
|
553
546
|
startTimestamp: number;
|
|
554
547
|
endTimestamp: number;
|
|
548
|
+
}
|
|
549
|
+
declare class Period implements Period {
|
|
555
550
|
constructor(period: Partial<Period>);
|
|
551
|
+
generateId(): void;
|
|
556
552
|
/**
|
|
557
553
|
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
558
554
|
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
@@ -561,8 +557,8 @@ declare class Period implements Base {
|
|
|
561
557
|
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
562
558
|
*/
|
|
563
559
|
setBounds(): void;
|
|
564
|
-
get dtStart(): Date;
|
|
565
|
-
get dtEnd(): Date;
|
|
560
|
+
get dtStart(): Date | undefined;
|
|
561
|
+
get dtEnd(): Date | undefined;
|
|
566
562
|
}
|
|
567
563
|
|
|
568
564
|
declare const METHOD: {
|
package/dist/index.js
CHANGED
|
@@ -194,6 +194,18 @@ var AttSheep = class {
|
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
var DisplayAttendance = class {
|
|
197
|
+
// Allows dynamic string keys
|
|
198
|
+
cntOM;
|
|
199
|
+
cntNB;
|
|
200
|
+
cntAC;
|
|
201
|
+
cntNF;
|
|
202
|
+
cntRNF;
|
|
203
|
+
desOM;
|
|
204
|
+
desNB;
|
|
205
|
+
desAC;
|
|
206
|
+
desNF;
|
|
207
|
+
desRNF;
|
|
208
|
+
total;
|
|
197
209
|
calcTotal() {
|
|
198
210
|
this.total = this.cntOM + this.cntNB + this.cntAC + this.cntNF + this.cntRNF;
|
|
199
211
|
}
|
|
@@ -349,13 +361,15 @@ var Session = class {
|
|
|
349
361
|
|
|
350
362
|
// src/classes/attendance/Title.ts
|
|
351
363
|
var Title = class {
|
|
352
|
-
getKey() {
|
|
353
|
-
return "dddd";
|
|
354
|
-
}
|
|
355
364
|
};
|
|
356
365
|
|
|
357
366
|
// src/classes/helper/DateEvent.ts
|
|
358
367
|
var DateEvent = class {
|
|
368
|
+
datetime;
|
|
369
|
+
precision;
|
|
370
|
+
eventName;
|
|
371
|
+
invitedBy;
|
|
372
|
+
remark;
|
|
359
373
|
constructor(datetime) {
|
|
360
374
|
if (datetime) this.datetime = datetime;
|
|
361
375
|
this.precision = "DAY" /* DAY */;
|
|
@@ -372,6 +386,54 @@ var DatePrecision = /* @__PURE__ */ ((DatePrecision2) => {
|
|
|
372
386
|
|
|
373
387
|
// src/classes/pastoral-team/Sheep.ts
|
|
374
388
|
var Sheep = class _Sheep {
|
|
389
|
+
// pastoral team info
|
|
390
|
+
st;
|
|
391
|
+
// small team id
|
|
392
|
+
cluster;
|
|
393
|
+
// cluster id
|
|
394
|
+
cg;
|
|
395
|
+
// cg id
|
|
396
|
+
status;
|
|
397
|
+
discipler;
|
|
398
|
+
// history record (spiritual journey/milestone)
|
|
399
|
+
/** first approach/contact (JieChu) */
|
|
400
|
+
firstApproach;
|
|
401
|
+
/** first CG/SERVICE */
|
|
402
|
+
firstAtt;
|
|
403
|
+
/** accept Christ */
|
|
404
|
+
acceptChrist;
|
|
405
|
+
// sheep info
|
|
406
|
+
name;
|
|
407
|
+
age;
|
|
408
|
+
birthday;
|
|
409
|
+
isBaptised;
|
|
410
|
+
dtBaptism;
|
|
411
|
+
contact;
|
|
412
|
+
gender;
|
|
413
|
+
nric;
|
|
414
|
+
address;
|
|
415
|
+
// in future might break to details like address line 1, state etc.
|
|
416
|
+
// attendance
|
|
417
|
+
attCnt;
|
|
418
|
+
/** Attendance count in recent 15 weeks (tentatively) */
|
|
419
|
+
recentAttCnt;
|
|
420
|
+
hideAtt;
|
|
421
|
+
// hide in attendance list
|
|
422
|
+
// ???
|
|
423
|
+
show;
|
|
424
|
+
// show in msj-progress-tracker
|
|
425
|
+
// base attributes
|
|
426
|
+
id;
|
|
427
|
+
deleted;
|
|
428
|
+
createdAt;
|
|
429
|
+
createdBy;
|
|
430
|
+
updatedAt;
|
|
431
|
+
updatedBy;
|
|
432
|
+
remark;
|
|
433
|
+
// not submit attributes
|
|
434
|
+
arrFlwUpCnt;
|
|
435
|
+
msj;
|
|
436
|
+
msjRecords;
|
|
375
437
|
constructor(id, name, status, cg, st, cluster, deleted, show, attCnt) {
|
|
376
438
|
this.id = id;
|
|
377
439
|
this.name = name;
|
|
@@ -393,6 +455,7 @@ var Sheep = class _Sheep {
|
|
|
393
455
|
|
|
394
456
|
// src/classes/attendance-report/ReportSheep.ts
|
|
395
457
|
var ReportSheep = class extends Sheep {
|
|
458
|
+
attMap;
|
|
396
459
|
constructor(sheep) {
|
|
397
460
|
super(
|
|
398
461
|
sheep.id,
|
|
@@ -412,6 +475,9 @@ var ReportSheep = class extends Sheep {
|
|
|
412
475
|
|
|
413
476
|
// src/classes/attendance-report/TitleAttendance.ts
|
|
414
477
|
var TitleAttendance = class {
|
|
478
|
+
cgAtt;
|
|
479
|
+
serviceAtt;
|
|
480
|
+
title;
|
|
415
481
|
constructor(cgAtt, serviceAtt, title) {
|
|
416
482
|
this.cgAtt = cgAtt;
|
|
417
483
|
this.serviceAtt = serviceAtt;
|
|
@@ -421,6 +487,22 @@ var TitleAttendance = class {
|
|
|
421
487
|
|
|
422
488
|
// src/classes/flw-up/FollowUpStatus.ts
|
|
423
489
|
var FollowUpStatus = class {
|
|
490
|
+
id;
|
|
491
|
+
method;
|
|
492
|
+
st;
|
|
493
|
+
// small team id
|
|
494
|
+
cluster;
|
|
495
|
+
// cluster id
|
|
496
|
+
cg;
|
|
497
|
+
// cg id
|
|
498
|
+
sheep;
|
|
499
|
+
// sheep name
|
|
500
|
+
in_list;
|
|
501
|
+
status;
|
|
502
|
+
timeStamp;
|
|
503
|
+
date;
|
|
504
|
+
discipler;
|
|
505
|
+
user;
|
|
424
506
|
constructor() {
|
|
425
507
|
this.id = "";
|
|
426
508
|
this.method = "";
|
|
@@ -438,6 +520,25 @@ var FollowUpStatus = class {
|
|
|
438
520
|
|
|
439
521
|
// src/classes/pastoral-team/CG.ts
|
|
440
522
|
var CG = class {
|
|
523
|
+
name;
|
|
524
|
+
/** small team id */
|
|
525
|
+
st;
|
|
526
|
+
//
|
|
527
|
+
/** cluster id */
|
|
528
|
+
cluster;
|
|
529
|
+
cglCnt;
|
|
530
|
+
sglCnt;
|
|
531
|
+
cglName;
|
|
532
|
+
/** row index in attendance report (1-based) */
|
|
533
|
+
rptRowIdx;
|
|
534
|
+
// base attributes
|
|
535
|
+
id;
|
|
536
|
+
deleted;
|
|
537
|
+
createdAt;
|
|
538
|
+
createdBy;
|
|
539
|
+
updatedAt;
|
|
540
|
+
updatedBy;
|
|
541
|
+
remark;
|
|
441
542
|
constructor(id, name, st, cluster, deleted) {
|
|
442
543
|
this.id = id;
|
|
443
544
|
this.name = name;
|
|
@@ -449,6 +550,14 @@ var CG = class {
|
|
|
449
550
|
|
|
450
551
|
// src/classes/pastoral-team/Cluster.ts
|
|
451
552
|
var Cluster = class {
|
|
553
|
+
id;
|
|
554
|
+
deleted;
|
|
555
|
+
name;
|
|
556
|
+
createdAt;
|
|
557
|
+
createdBy;
|
|
558
|
+
updatedAt;
|
|
559
|
+
updatedBy;
|
|
560
|
+
remark;
|
|
452
561
|
constructor(id, name, deleted) {
|
|
453
562
|
this.id = id;
|
|
454
563
|
this.name = name;
|
|
@@ -458,6 +567,18 @@ var Cluster = class {
|
|
|
458
567
|
|
|
459
568
|
// src/classes/pastoral-team/SmallTeam.ts
|
|
460
569
|
var SmallTeam = class {
|
|
570
|
+
name;
|
|
571
|
+
/** cluster id */
|
|
572
|
+
cluster;
|
|
573
|
+
// cluster id
|
|
574
|
+
// base attributes
|
|
575
|
+
id;
|
|
576
|
+
deleted;
|
|
577
|
+
createdAt;
|
|
578
|
+
createdBy;
|
|
579
|
+
updatedAt;
|
|
580
|
+
updatedBy;
|
|
581
|
+
remark;
|
|
461
582
|
constructor(id, name, cluster, deleted) {
|
|
462
583
|
this.id = id;
|
|
463
584
|
this.name = name;
|
|
@@ -468,6 +589,7 @@ var SmallTeam = class {
|
|
|
468
589
|
|
|
469
590
|
// src/classes/user-management/AssignedCG.ts
|
|
470
591
|
var AssignedCG = class {
|
|
592
|
+
cg;
|
|
471
593
|
constructor(cg) {
|
|
472
594
|
this.cg = cg;
|
|
473
595
|
}
|
|
@@ -475,18 +597,33 @@ var AssignedCG = class {
|
|
|
475
597
|
|
|
476
598
|
// src/classes/helper/Click.ts
|
|
477
599
|
var Click = class {
|
|
600
|
+
action;
|
|
601
|
+
timeStamp;
|
|
602
|
+
userId;
|
|
603
|
+
remark;
|
|
478
604
|
};
|
|
479
605
|
|
|
480
606
|
// src/classes/helper/Column.ts
|
|
481
607
|
var Column = class {
|
|
608
|
+
visible = false;
|
|
609
|
+
name;
|
|
482
610
|
constructor(name) {
|
|
483
|
-
this.visible = false;
|
|
484
611
|
this.name = name;
|
|
485
612
|
}
|
|
486
613
|
};
|
|
487
614
|
|
|
488
615
|
// src/classes/AppUser.ts
|
|
489
616
|
var AppUser = class {
|
|
617
|
+
id;
|
|
618
|
+
name;
|
|
619
|
+
/** Login id: phone number/email */
|
|
620
|
+
phoneNum;
|
|
621
|
+
permission;
|
|
622
|
+
pastoral_team;
|
|
623
|
+
permissions;
|
|
624
|
+
assigned_cg;
|
|
625
|
+
idSheep;
|
|
626
|
+
settings;
|
|
490
627
|
constructor(id, name, phoneNum, permission) {
|
|
491
628
|
this.id = id;
|
|
492
629
|
this.name = name;
|
|
@@ -500,6 +637,15 @@ var Period = class {
|
|
|
500
637
|
constructor(period) {
|
|
501
638
|
Object.assign(this, period);
|
|
502
639
|
}
|
|
640
|
+
generateId() {
|
|
641
|
+
if (!this.year) {
|
|
642
|
+
throw new Error("Cannot generate Period ID: year is required.");
|
|
643
|
+
}
|
|
644
|
+
if (!this.month) {
|
|
645
|
+
throw new Error("Cannot generate Period ID: month is required.");
|
|
646
|
+
}
|
|
647
|
+
this.id = this.year.toString() + "-" + this.month.toString().padStart(2, "0");
|
|
648
|
+
}
|
|
503
649
|
/**
|
|
504
650
|
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
505
651
|
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
@@ -514,10 +660,12 @@ var Period = class {
|
|
|
514
660
|
this.endTimestamp = end.getTime();
|
|
515
661
|
}
|
|
516
662
|
get dtStart() {
|
|
517
|
-
return new Date(this.startTimestamp);
|
|
663
|
+
if (this.startTimestamp) return new Date(this.startTimestamp);
|
|
664
|
+
else return void 0;
|
|
518
665
|
}
|
|
519
666
|
get dtEnd() {
|
|
520
|
-
return new Date(this.endTimestamp);
|
|
667
|
+
if (this.endTimestamp) return new Date(this.endTimestamp);
|
|
668
|
+
else return void 0;
|
|
521
669
|
}
|
|
522
670
|
};
|
|
523
671
|
|