@mody-park-cha-raja/finance_common 4.29.1-beta.2 → 4.29.1-beta.4
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.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,12 @@ declare const FLAT_NUMBERS: readonly string[];
|
|
|
14
14
|
declare const FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
|
|
15
15
|
/** @deprecated Use FlatEntity from the database instead. Kept for migration reference. */
|
|
16
16
|
declare const WINGS: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* All single-letter wing alphabets (A–Z) available for Flat entity creation.
|
|
19
|
+
* Unlike the deprecated static WINGS (A–I seed), this covers every letter the
|
|
20
|
+
* FLAT_WING_PATTERN accepts, so new societies are not limited to the seeded set.
|
|
21
|
+
*/
|
|
22
|
+
declare const WING_ALPHABETS: readonly string[];
|
|
17
23
|
|
|
18
24
|
declare enum ConfigurationKey {
|
|
19
25
|
OPENING_BALANCE = "opening_balance",
|
|
@@ -321,7 +327,7 @@ interface FlatOption {
|
|
|
321
327
|
label: string;
|
|
322
328
|
value: string;
|
|
323
329
|
}
|
|
324
|
-
declare class FlatModel {
|
|
330
|
+
declare class FlatModel extends BaseEntityModel implements IFlatEntity {
|
|
325
331
|
id: number;
|
|
326
332
|
wing: string;
|
|
327
333
|
unitNumber: string;
|
|
@@ -334,11 +340,19 @@ declare class FlatModel {
|
|
|
334
340
|
createdByUser?: UserModel;
|
|
335
341
|
updatedByUser?: UserModel;
|
|
336
342
|
donations?: DonationModel[];
|
|
343
|
+
/**
|
|
344
|
+
* True when at least one donation has been received against this flat.
|
|
345
|
+
* Expects the donations relation populated — when fetched server-side
|
|
346
|
+
* scoped to status = Active, this means an active donation exists.
|
|
347
|
+
*/
|
|
348
|
+
isDonationReceived(): boolean;
|
|
337
349
|
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
338
350
|
static readonly FLAT_NUMBERS: readonly string[];
|
|
339
351
|
static readonly FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
|
|
340
352
|
static readonly SPECIAL_FLATS: readonly string[];
|
|
341
353
|
static readonly WINGS: readonly string[];
|
|
354
|
+
/** A–Z — every single-letter wing available for Flat entity creation. */
|
|
355
|
+
static readonly WING_ALPHABETS: readonly string[];
|
|
342
356
|
static getDonationYear(): number;
|
|
343
357
|
static getTotalFlats(): number;
|
|
344
358
|
static getWingsFromFlats(flats: ReadonlyArray<{
|
|
@@ -1068,4 +1082,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
|
|
|
1068
1082
|
declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
|
|
1069
1083
|
declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
|
|
1070
1084
|
|
|
1071
|
-
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
|
1085
|
+
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ declare const FLAT_NUMBERS: readonly string[];
|
|
|
14
14
|
declare const FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
|
|
15
15
|
/** @deprecated Use FlatEntity from the database instead. Kept for migration reference. */
|
|
16
16
|
declare const WINGS: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* All single-letter wing alphabets (A–Z) available for Flat entity creation.
|
|
19
|
+
* Unlike the deprecated static WINGS (A–I seed), this covers every letter the
|
|
20
|
+
* FLAT_WING_PATTERN accepts, so new societies are not limited to the seeded set.
|
|
21
|
+
*/
|
|
22
|
+
declare const WING_ALPHABETS: readonly string[];
|
|
17
23
|
|
|
18
24
|
declare enum ConfigurationKey {
|
|
19
25
|
OPENING_BALANCE = "opening_balance",
|
|
@@ -321,7 +327,7 @@ interface FlatOption {
|
|
|
321
327
|
label: string;
|
|
322
328
|
value: string;
|
|
323
329
|
}
|
|
324
|
-
declare class FlatModel {
|
|
330
|
+
declare class FlatModel extends BaseEntityModel implements IFlatEntity {
|
|
325
331
|
id: number;
|
|
326
332
|
wing: string;
|
|
327
333
|
unitNumber: string;
|
|
@@ -334,11 +340,19 @@ declare class FlatModel {
|
|
|
334
340
|
createdByUser?: UserModel;
|
|
335
341
|
updatedByUser?: UserModel;
|
|
336
342
|
donations?: DonationModel[];
|
|
343
|
+
/**
|
|
344
|
+
* True when at least one donation has been received against this flat.
|
|
345
|
+
* Expects the donations relation populated — when fetched server-side
|
|
346
|
+
* scoped to status = Active, this means an active donation exists.
|
|
347
|
+
*/
|
|
348
|
+
isDonationReceived(): boolean;
|
|
337
349
|
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
338
350
|
static readonly FLAT_NUMBERS: readonly string[];
|
|
339
351
|
static readonly FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
|
|
340
352
|
static readonly SPECIAL_FLATS: readonly string[];
|
|
341
353
|
static readonly WINGS: readonly string[];
|
|
354
|
+
/** A–Z — every single-letter wing available for Flat entity creation. */
|
|
355
|
+
static readonly WING_ALPHABETS: readonly string[];
|
|
342
356
|
static getDonationYear(): number;
|
|
343
357
|
static getTotalFlats(): number;
|
|
344
358
|
static getWingsFromFlats(flats: ReadonlyArray<{
|
|
@@ -1068,4 +1082,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
|
|
|
1068
1082
|
declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
|
|
1069
1083
|
declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
|
|
1070
1084
|
|
|
1071
|
-
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
|
1085
|
+
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
package/dist/index.js
CHANGED
|
@@ -81,6 +81,7 @@ __export(index_exports, {
|
|
|
81
81
|
VendorModel: () => VendorModel,
|
|
82
82
|
VendorType: () => VendorType,
|
|
83
83
|
WINGS: () => WINGS,
|
|
84
|
+
WING_ALPHABETS: () => WING_ALPHABETS,
|
|
84
85
|
buildUserExpenseReport: () => buildUserExpenseReport,
|
|
85
86
|
buildUserExpenseWorkbook: () => buildUserExpenseWorkbook,
|
|
86
87
|
buildWingWiseCollectionReport: () => buildWingWiseCollectionReport,
|
|
@@ -439,6 +440,10 @@ var WINGS = (() => {
|
|
|
439
440
|
}
|
|
440
441
|
return wings;
|
|
441
442
|
})();
|
|
443
|
+
var WING_ALPHABETS = Array.from(
|
|
444
|
+
{ length: 26 },
|
|
445
|
+
(_, i) => String.fromCharCode(65 + i)
|
|
446
|
+
);
|
|
442
447
|
|
|
443
448
|
// src/enums/configuration-key.enum.ts
|
|
444
449
|
var ConfigurationKey = /* @__PURE__ */ ((ConfigurationKey2) => {
|
|
@@ -1091,8 +1096,9 @@ function convertNumberToWords(num) {
|
|
|
1091
1096
|
}
|
|
1092
1097
|
|
|
1093
1098
|
// src/models/flat.entity.model.ts
|
|
1094
|
-
var _FlatModel = class _FlatModel {
|
|
1099
|
+
var _FlatModel = class _FlatModel extends BaseEntityModel {
|
|
1095
1100
|
constructor() {
|
|
1101
|
+
super(...arguments);
|
|
1096
1102
|
this.id = 0;
|
|
1097
1103
|
this.wing = "";
|
|
1098
1104
|
this.unitNumber = "";
|
|
@@ -1105,6 +1111,14 @@ var _FlatModel = class _FlatModel {
|
|
|
1105
1111
|
static populateFromEntity(entity) {
|
|
1106
1112
|
return Object.assign(new _FlatModel(), entity);
|
|
1107
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
* True when at least one donation has been received against this flat.
|
|
1116
|
+
* Expects the donations relation populated — when fetched server-side
|
|
1117
|
+
* scoped to status = Active, this means an active donation exists.
|
|
1118
|
+
*/
|
|
1119
|
+
isDonationReceived() {
|
|
1120
|
+
return (this.donations?.length ?? 0) > 0;
|
|
1121
|
+
}
|
|
1108
1122
|
static getDonationYear() {
|
|
1109
1123
|
return (/* @__PURE__ */ new Date()).getFullYear();
|
|
1110
1124
|
}
|
|
@@ -1128,7 +1142,10 @@ var _FlatModel = class _FlatModel {
|
|
|
1128
1142
|
static getFlatOptionsFromFlats(flats, wing) {
|
|
1129
1143
|
const specials = _FlatModel.getSpecialsFromFlats(flats);
|
|
1130
1144
|
return [
|
|
1131
|
-
...flats.filter((f) => f.wing === wing).map((f) => ({
|
|
1145
|
+
...flats.filter((f) => f.wing === wing).map((f) => ({
|
|
1146
|
+
label: `${wing}-${f.unitNumber}`,
|
|
1147
|
+
value: f.unitNumber
|
|
1148
|
+
})),
|
|
1132
1149
|
...specials.map((label) => ({ label, value: label }))
|
|
1133
1150
|
];
|
|
1134
1151
|
}
|
|
@@ -1240,6 +1257,8 @@ _FlatModel.FLAT_NUMBERS = FLAT_NUMBERS;
|
|
|
1240
1257
|
_FlatModel.FLATS_BY_WING = FLATS_BY_WING;
|
|
1241
1258
|
_FlatModel.SPECIAL_FLATS = SPECIAL_FLATS;
|
|
1242
1259
|
_FlatModel.WINGS = WINGS;
|
|
1260
|
+
/** A–Z — every single-letter wing available for Flat entity creation. */
|
|
1261
|
+
_FlatModel.WING_ALPHABETS = WING_ALPHABETS;
|
|
1243
1262
|
var FlatModel = _FlatModel;
|
|
1244
1263
|
|
|
1245
1264
|
// src/models/sponsor-history.entity.model.ts
|
|
@@ -2219,6 +2238,7 @@ function validateFlatOrThrow(input) {
|
|
|
2219
2238
|
VendorModel,
|
|
2220
2239
|
VendorType,
|
|
2221
2240
|
WINGS,
|
|
2241
|
+
WING_ALPHABETS,
|
|
2222
2242
|
buildUserExpenseReport,
|
|
2223
2243
|
buildUserExpenseWorkbook,
|
|
2224
2244
|
buildWingWiseCollectionReport,
|