cyc-type-def 6.4.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 +180 -4
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +179 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
MsjJoinStatus: () => MsjJoinStatus,
|
|
43
43
|
MsjJoinStatusInfo: () => MsjJoinStatusInfo,
|
|
44
44
|
PERMISSION: () => PERMISSION,
|
|
45
|
+
Period: () => Period,
|
|
45
46
|
ReportSheep: () => ReportSheep,
|
|
46
47
|
Session: () => Session,
|
|
47
48
|
SessionAttendance: () => SessionAttendance,
|
|
@@ -256,6 +257,18 @@ var AttSheep = class {
|
|
|
256
257
|
}
|
|
257
258
|
};
|
|
258
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;
|
|
259
272
|
calcTotal() {
|
|
260
273
|
this.total = this.cntOM + this.cntNB + this.cntAC + this.cntNF + this.cntRNF;
|
|
261
274
|
}
|
|
@@ -411,13 +424,15 @@ var Session = class {
|
|
|
411
424
|
|
|
412
425
|
// src/classes/attendance/Title.ts
|
|
413
426
|
var Title = class {
|
|
414
|
-
getKey() {
|
|
415
|
-
return "dddd";
|
|
416
|
-
}
|
|
417
427
|
};
|
|
418
428
|
|
|
419
429
|
// src/classes/helper/DateEvent.ts
|
|
420
430
|
var DateEvent = class {
|
|
431
|
+
datetime;
|
|
432
|
+
precision;
|
|
433
|
+
eventName;
|
|
434
|
+
invitedBy;
|
|
435
|
+
remark;
|
|
421
436
|
constructor(datetime) {
|
|
422
437
|
if (datetime) this.datetime = datetime;
|
|
423
438
|
this.precision = "DAY" /* DAY */;
|
|
@@ -434,6 +449,54 @@ var DatePrecision = /* @__PURE__ */ ((DatePrecision2) => {
|
|
|
434
449
|
|
|
435
450
|
// src/classes/pastoral-team/Sheep.ts
|
|
436
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;
|
|
437
500
|
constructor(id, name, status, cg, st, cluster, deleted, show, attCnt) {
|
|
438
501
|
this.id = id;
|
|
439
502
|
this.name = name;
|
|
@@ -455,6 +518,7 @@ var Sheep = class _Sheep {
|
|
|
455
518
|
|
|
456
519
|
// src/classes/attendance-report/ReportSheep.ts
|
|
457
520
|
var ReportSheep = class extends Sheep {
|
|
521
|
+
attMap;
|
|
458
522
|
constructor(sheep) {
|
|
459
523
|
super(
|
|
460
524
|
sheep.id,
|
|
@@ -474,6 +538,9 @@ var ReportSheep = class extends Sheep {
|
|
|
474
538
|
|
|
475
539
|
// src/classes/attendance-report/TitleAttendance.ts
|
|
476
540
|
var TitleAttendance = class {
|
|
541
|
+
cgAtt;
|
|
542
|
+
serviceAtt;
|
|
543
|
+
title;
|
|
477
544
|
constructor(cgAtt, serviceAtt, title) {
|
|
478
545
|
this.cgAtt = cgAtt;
|
|
479
546
|
this.serviceAtt = serviceAtt;
|
|
@@ -483,6 +550,22 @@ var TitleAttendance = class {
|
|
|
483
550
|
|
|
484
551
|
// src/classes/flw-up/FollowUpStatus.ts
|
|
485
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;
|
|
486
569
|
constructor() {
|
|
487
570
|
this.id = "";
|
|
488
571
|
this.method = "";
|
|
@@ -500,6 +583,25 @@ var FollowUpStatus = class {
|
|
|
500
583
|
|
|
501
584
|
// src/classes/pastoral-team/CG.ts
|
|
502
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;
|
|
503
605
|
constructor(id, name, st, cluster, deleted) {
|
|
504
606
|
this.id = id;
|
|
505
607
|
this.name = name;
|
|
@@ -511,6 +613,14 @@ var CG = class {
|
|
|
511
613
|
|
|
512
614
|
// src/classes/pastoral-team/Cluster.ts
|
|
513
615
|
var Cluster = class {
|
|
616
|
+
id;
|
|
617
|
+
deleted;
|
|
618
|
+
name;
|
|
619
|
+
createdAt;
|
|
620
|
+
createdBy;
|
|
621
|
+
updatedAt;
|
|
622
|
+
updatedBy;
|
|
623
|
+
remark;
|
|
514
624
|
constructor(id, name, deleted) {
|
|
515
625
|
this.id = id;
|
|
516
626
|
this.name = name;
|
|
@@ -520,6 +630,18 @@ var Cluster = class {
|
|
|
520
630
|
|
|
521
631
|
// src/classes/pastoral-team/SmallTeam.ts
|
|
522
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;
|
|
523
645
|
constructor(id, name, cluster, deleted) {
|
|
524
646
|
this.id = id;
|
|
525
647
|
this.name = name;
|
|
@@ -530,6 +652,7 @@ var SmallTeam = class {
|
|
|
530
652
|
|
|
531
653
|
// src/classes/user-management/AssignedCG.ts
|
|
532
654
|
var AssignedCG = class {
|
|
655
|
+
cg;
|
|
533
656
|
constructor(cg) {
|
|
534
657
|
this.cg = cg;
|
|
535
658
|
}
|
|
@@ -537,18 +660,33 @@ var AssignedCG = class {
|
|
|
537
660
|
|
|
538
661
|
// src/classes/helper/Click.ts
|
|
539
662
|
var Click = class {
|
|
663
|
+
action;
|
|
664
|
+
timeStamp;
|
|
665
|
+
userId;
|
|
666
|
+
remark;
|
|
540
667
|
};
|
|
541
668
|
|
|
542
669
|
// src/classes/helper/Column.ts
|
|
543
670
|
var Column = class {
|
|
671
|
+
visible = false;
|
|
672
|
+
name;
|
|
544
673
|
constructor(name) {
|
|
545
|
-
this.visible = false;
|
|
546
674
|
this.name = name;
|
|
547
675
|
}
|
|
548
676
|
};
|
|
549
677
|
|
|
550
678
|
// src/classes/AppUser.ts
|
|
551
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;
|
|
552
690
|
constructor(id, name, phoneNum, permission) {
|
|
553
691
|
this.id = id;
|
|
554
692
|
this.name = name;
|
|
@@ -557,6 +695,43 @@ var AppUser = class {
|
|
|
557
695
|
}
|
|
558
696
|
};
|
|
559
697
|
|
|
698
|
+
// src/classes/Period.ts
|
|
699
|
+
var Period = class {
|
|
700
|
+
constructor(period) {
|
|
701
|
+
Object.assign(this, period);
|
|
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
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
714
|
+
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
715
|
+
* - `startTimestamp`: The absolute first millisecond of the month (00:00:00.000).
|
|
716
|
+
* - `endTimestamp`: The absolute last millisecond of the month (23:59:59.999).
|
|
717
|
+
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
718
|
+
*/
|
|
719
|
+
setBounds() {
|
|
720
|
+
const start = new Date(this.year, this.month - 1, 1, 0, 0, 0, 0);
|
|
721
|
+
const end = new Date(this.year, this.month, 0, 23, 59, 59, 999);
|
|
722
|
+
this.startTimestamp = start.getTime();
|
|
723
|
+
this.endTimestamp = end.getTime();
|
|
724
|
+
}
|
|
725
|
+
get dtStart() {
|
|
726
|
+
if (this.startTimestamp) return new Date(this.startTimestamp);
|
|
727
|
+
else return void 0;
|
|
728
|
+
}
|
|
729
|
+
get dtEnd() {
|
|
730
|
+
if (this.endTimestamp) return new Date(this.endTimestamp);
|
|
731
|
+
else return void 0;
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
|
|
560
735
|
// src/constants/click.constant.ts
|
|
561
736
|
var ClickAction = /* @__PURE__ */ ((ClickAction2) => {
|
|
562
737
|
ClickAction2[ClickAction2["P_WeeklyAttendance"] = 0] = "P_WeeklyAttendance";
|
|
@@ -725,6 +900,7 @@ function compareCG(a, b) {
|
|
|
725
900
|
MsjJoinStatus,
|
|
726
901
|
MsjJoinStatusInfo,
|
|
727
902
|
PERMISSION,
|
|
903
|
+
Period,
|
|
728
904
|
ReportSheep,
|
|
729
905
|
Session,
|
|
730
906
|
SessionAttendance,
|
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,6 +540,27 @@ interface BaseDialogInput {
|
|
|
540
540
|
action: DialogAction;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
interface Period extends Base {
|
|
544
|
+
year: number;
|
|
545
|
+
month: number;
|
|
546
|
+
startTimestamp: number;
|
|
547
|
+
endTimestamp: number;
|
|
548
|
+
}
|
|
549
|
+
declare class Period implements Period {
|
|
550
|
+
constructor(period: Partial<Period>);
|
|
551
|
+
generateId(): void;
|
|
552
|
+
/**
|
|
553
|
+
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
554
|
+
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
555
|
+
* - `startTimestamp`: The absolute first millisecond of the month (00:00:00.000).
|
|
556
|
+
* - `endTimestamp`: The absolute last millisecond of the month (23:59:59.999).
|
|
557
|
+
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
558
|
+
*/
|
|
559
|
+
setBounds(): void;
|
|
560
|
+
get dtStart(): Date | undefined;
|
|
561
|
+
get dtEnd(): Date | undefined;
|
|
562
|
+
}
|
|
563
|
+
|
|
543
564
|
declare const METHOD: {
|
|
544
565
|
SKY: string;
|
|
545
566
|
GROUND: string;
|
|
@@ -589,4 +610,4 @@ declare function getDayMonthSortKey(timestamp: number): number;
|
|
|
589
610
|
|
|
590
611
|
declare function compareCG(a: CG, b: CG): number;
|
|
591
612
|
|
|
592
|
-
export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, type BaseDialogInput, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, DateEvent, DatePrecision, type Device, DialogAction, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
|
|
613
|
+
export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, type BaseDialogInput, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, DateEvent, DatePrecision, type Device, DialogAction, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, Period, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
|
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,6 +540,27 @@ interface BaseDialogInput {
|
|
|
540
540
|
action: DialogAction;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
interface Period extends Base {
|
|
544
|
+
year: number;
|
|
545
|
+
month: number;
|
|
546
|
+
startTimestamp: number;
|
|
547
|
+
endTimestamp: number;
|
|
548
|
+
}
|
|
549
|
+
declare class Period implements Period {
|
|
550
|
+
constructor(period: Partial<Period>);
|
|
551
|
+
generateId(): void;
|
|
552
|
+
/**
|
|
553
|
+
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
554
|
+
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
555
|
+
* - `startTimestamp`: The absolute first millisecond of the month (00:00:00.000).
|
|
556
|
+
* - `endTimestamp`: The absolute last millisecond of the month (23:59:59.999).
|
|
557
|
+
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
558
|
+
*/
|
|
559
|
+
setBounds(): void;
|
|
560
|
+
get dtStart(): Date | undefined;
|
|
561
|
+
get dtEnd(): Date | undefined;
|
|
562
|
+
}
|
|
563
|
+
|
|
543
564
|
declare const METHOD: {
|
|
544
565
|
SKY: string;
|
|
545
566
|
GROUND: string;
|
|
@@ -589,4 +610,4 @@ declare function getDayMonthSortKey(timestamp: number): number;
|
|
|
589
610
|
|
|
590
611
|
declare function compareCG(a: CG, b: CG): number;
|
|
591
612
|
|
|
592
|
-
export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, type BaseDialogInput, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, DateEvent, DatePrecision, type Device, DialogAction, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
|
|
613
|
+
export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, type BaseDialogInput, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, DateEvent, DatePrecision, type Device, DialogAction, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, Period, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
|
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;
|
|
@@ -495,6 +632,43 @@ var AppUser = class {
|
|
|
495
632
|
}
|
|
496
633
|
};
|
|
497
634
|
|
|
635
|
+
// src/classes/Period.ts
|
|
636
|
+
var Period = class {
|
|
637
|
+
constructor(period) {
|
|
638
|
+
Object.assign(this, period);
|
|
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
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Calculates and sets the millisecond timestamps for the start and end of the period.
|
|
651
|
+
* * Uses the instance's `year` and `month` (1-based) to compute:
|
|
652
|
+
* - `startTimestamp`: The absolute first millisecond of the month (00:00:00.000).
|
|
653
|
+
* - `endTimestamp`: The absolute last millisecond of the month (23:59:59.999).
|
|
654
|
+
* * @throws This method will produce invalid timestamps (`NaN`) if `year` or `month` are undefined.
|
|
655
|
+
*/
|
|
656
|
+
setBounds() {
|
|
657
|
+
const start = new Date(this.year, this.month - 1, 1, 0, 0, 0, 0);
|
|
658
|
+
const end = new Date(this.year, this.month, 0, 23, 59, 59, 999);
|
|
659
|
+
this.startTimestamp = start.getTime();
|
|
660
|
+
this.endTimestamp = end.getTime();
|
|
661
|
+
}
|
|
662
|
+
get dtStart() {
|
|
663
|
+
if (this.startTimestamp) return new Date(this.startTimestamp);
|
|
664
|
+
else return void 0;
|
|
665
|
+
}
|
|
666
|
+
get dtEnd() {
|
|
667
|
+
if (this.endTimestamp) return new Date(this.endTimestamp);
|
|
668
|
+
else return void 0;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
|
|
498
672
|
// src/constants/click.constant.ts
|
|
499
673
|
var ClickAction = /* @__PURE__ */ ((ClickAction2) => {
|
|
500
674
|
ClickAction2[ClickAction2["P_WeeklyAttendance"] = 0] = "P_WeeklyAttendance";
|
|
@@ -662,6 +836,7 @@ export {
|
|
|
662
836
|
MsjJoinStatus,
|
|
663
837
|
MsjJoinStatusInfo,
|
|
664
838
|
PERMISSION,
|
|
839
|
+
Period,
|
|
665
840
|
ReportSheep,
|
|
666
841
|
Session,
|
|
667
842
|
SessionAttendance,
|