tin-spa 20.16.0 → 20.16.14

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.
Files changed (43) hide show
  1. package/core/index.d.ts +28 -37
  2. package/fesm2022/{tin-spa-accounting.module-CamqAeW_.mjs → tin-spa-accounting.module-MuYH__EY.mjs} +52 -25
  3. package/fesm2022/{tin-spa-accounting.module-CamqAeW_.mjs.map → tin-spa-accounting.module-MuYH__EY.mjs.map} +1 -1
  4. package/fesm2022/{tin-spa-agent-page.component-DTYn54p0.mjs → tin-spa-agent-page.component-CUCN72Ia.mjs} +2 -2
  5. package/fesm2022/{tin-spa-agent-page.component-DTYn54p0.mjs.map → tin-spa-agent-page.component-CUCN72Ia.mjs.map} +1 -1
  6. package/fesm2022/{tin-spa-agent.component-CZKMWl3r.mjs → tin-spa-agent.component-mIDUqL_B.mjs} +2 -2
  7. package/fesm2022/{tin-spa-agent.component-CZKMWl3r.mjs.map → tin-spa-agent.component-mIDUqL_B.mjs.map} +1 -1
  8. package/fesm2022/{tin-spa-assets.module-BcOjlhfm.mjs → tin-spa-assets.module-CKipQlJI.mjs} +2 -2
  9. package/fesm2022/{tin-spa-assets.module-BcOjlhfm.mjs.map → tin-spa-assets.module-CKipQlJI.mjs.map} +1 -1
  10. package/fesm2022/tin-spa-core.mjs +792 -266
  11. package/fesm2022/tin-spa-core.mjs.map +1 -1
  12. package/fesm2022/{tin-spa-general-erp.module-b6SjnWUM.mjs → tin-spa-general-erp.module-Bc7qsj3E.mjs} +2 -2
  13. package/fesm2022/{tin-spa-general-erp.module-b6SjnWUM.mjs.map → tin-spa-general-erp.module-Bc7qsj3E.mjs.map} +1 -1
  14. package/fesm2022/{tin-spa-hr.module-DkGVK2lX.mjs → tin-spa-hr.module-hG3zFS80.mjs} +2 -2
  15. package/fesm2022/{tin-spa-hr.module-DkGVK2lX.mjs.map → tin-spa-hr.module-hG3zFS80.mjs.map} +1 -1
  16. package/fesm2022/{tin-spa-inventory.module-CYWBqSCd.mjs → tin-spa-inventory.module-BYFJazxE.mjs} +2 -2
  17. package/fesm2022/{tin-spa-inventory.module-CYWBqSCd.mjs.map → tin-spa-inventory.module-BYFJazxE.mjs.map} +1 -1
  18. package/fesm2022/tin-spa-keys.mjs +38 -2
  19. package/fesm2022/tin-spa-keys.mjs.map +1 -1
  20. package/fesm2022/tin-spa-landing.mjs +2 -2
  21. package/fesm2022/tin-spa-landing.mjs.map +1 -1
  22. package/fesm2022/{tin-spa-loans.module-BDh-T-Ng.mjs → tin-spa-loans.module-ICVGFHaj.mjs} +2 -2
  23. package/fesm2022/{tin-spa-loans.module-BDh-T-Ng.mjs.map → tin-spa-loans.module-ICVGFHaj.mjs.map} +1 -1
  24. package/fesm2022/{tin-spa-manufacturing.module-9Ti-BFb2.mjs → tin-spa-manufacturing.module-CGYMdDfS.mjs} +2 -2
  25. package/fesm2022/{tin-spa-manufacturing.module-9Ti-BFb2.mjs.map → tin-spa-manufacturing.module-CGYMdDfS.mjs.map} +1 -1
  26. package/fesm2022/{tin-spa-payroll.module-54Efumv_.mjs → tin-spa-payroll.module-hr0VZKIT.mjs} +27 -8
  27. package/fesm2022/tin-spa-payroll.module-hr0VZKIT.mjs.map +1 -0
  28. package/fesm2022/{tin-spa-purchasing.module-Bq8JnsyM.mjs → tin-spa-purchasing.module-BIBDx-oe.mjs} +2 -2
  29. package/fesm2022/{tin-spa-purchasing.module-Bq8JnsyM.mjs.map → tin-spa-purchasing.module-BIBDx-oe.mjs.map} +1 -1
  30. package/fesm2022/{tin-spa-sales.module-nyrJulzD.mjs → tin-spa-sales.module-CoyY0k-a.mjs} +20 -4
  31. package/fesm2022/tin-spa-sales.module-CoyY0k-a.mjs.map +1 -0
  32. package/fesm2022/{tin-spa-tenancy-erp.module-DGATA-p_.mjs → tin-spa-tenancy-erp.module-VjOlW33U.mjs} +6 -6
  33. package/fesm2022/tin-spa-tenancy-erp.module-VjOlW33U.mjs.map +1 -0
  34. package/fesm2022/{tin-spa-tin-spa-BMy59BVn.mjs → tin-spa-tin-spa-DhI6eeit.mjs} +522 -154
  35. package/fesm2022/tin-spa-tin-spa-DhI6eeit.mjs.map +1 -0
  36. package/fesm2022/tin-spa.mjs +1 -1
  37. package/index.d.ts +29 -9
  38. package/keys/index.d.ts +37 -1
  39. package/package.json +1 -1
  40. package/fesm2022/tin-spa-payroll.module-54Efumv_.mjs.map +0 -1
  41. package/fesm2022/tin-spa-sales.module-nyrJulzD.mjs.map +0 -1
  42. package/fesm2022/tin-spa-tenancy-erp.module-DGATA-p_.mjs.map +0 -1
  43. package/fesm2022/tin-spa-tin-spa-BMy59BVn.mjs.map +0 -1
package/core/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as rxjs from 'rxjs';
2
2
  import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
3
  import * as tin_spa_core from 'tin-spa/core';
4
4
  import * as i0 from '@angular/core';
5
- import { InjectionToken, EnvironmentProviders, Injector, NgZone, OnInit, EventEmitter, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
5
+ import { EnvironmentProviders, Injector, NgZone, OnInit, EventEmitter, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
6
6
  import * as i11 from '@angular/material/dialog';
7
7
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
8
8
  import { HttpClient, HttpContext, HttpResponse, HttpErrorResponse, HttpContextToken } from '@angular/common/http';
@@ -12,10 +12,12 @@ import * as i12 from '@angular/material/snack-bar';
12
12
  import { MatSnackBar } from '@angular/material/snack-bar';
13
13
  import { SocialUser, SocialAuthService } from '@abacritt/angularx-social-login';
14
14
  import * as signalR from '@microsoft/signalr';
15
- import * as i1 from '@angular/common';
16
- import { PlatformLocation, LocationStrategy } from '@angular/common';
15
+ import { TinSpaRuntimeConfig } from 'tin-spa/keys';
16
+ export { TIN_SPA_RUNTIME_CONFIG, TIN_SPA_RUNTIME_DEFAULTS, TinSpaMsalConfig, TinSpaRuntimeConfig, TinSpaTableDefaults } from 'tin-spa/keys';
17
17
  import * as i2 from '@angular/forms';
18
18
  import { FormControl } from '@angular/forms';
19
+ import * as i1 from '@angular/common';
20
+ import { PlatformLocation, LocationStrategy } from '@angular/common';
19
21
  import * as i3 from '@angular/material/menu';
20
22
  import * as i4 from '@angular/material/slider';
21
23
  import * as i5 from '@angular/material/table';
@@ -943,6 +945,7 @@ interface Column {
943
945
  options?: any[];
944
946
  optionDisplay?: string;
945
947
  optionValue?: string;
948
+ display?: (row: any) => any;
946
949
  detailsConfig?: DetailsDialogConfig;
947
950
  hidden?: VisibilityValue;
948
951
  visible?: VisibilityValue;
@@ -1572,37 +1575,6 @@ declare class LogService {
1572
1575
  static ɵprov: i0.ɵɵInjectableDeclaration<LogService>;
1573
1576
  }
1574
1577
 
1575
- interface TinSpaMsalConfig {
1576
- clientId: string;
1577
- authority: string;
1578
- redirectUri: string;
1579
- }
1580
- interface TinSpaTableDefaults {
1581
- /** Default for TableConfig.realTime. */
1582
- realTime?: boolean;
1583
- /** Default for TableConfig.realTimeFallbackMs — the wait before a real-time table falls back to a refresh. Library default 3000. */
1584
- realTimeFallbackMs?: number;
1585
- /** Default for TableConfig.offline. `true` is shorthand for { enabled: true }. */
1586
- offline?: any;
1587
- /** Default for TableConfig.pagination. `true` is shorthand for the library's default page size. */
1588
- pagination?: any;
1589
- }
1590
- interface TinSpaRuntimeConfig {
1591
- /** Use path routing (/home) instead of hash routing (/#/home). Default false (hash). */
1592
- pathRouting: boolean;
1593
- /** Enable real-time (SignalR) features. Default false (disabled). */
1594
- realTime: boolean;
1595
- /** Enable offline capability (TinSync: read cache + outbox + sync tray + connectivity indicator). Default false —
1596
- * apps that never use offline tables should leave this off so none of the offline machinery ever runs for them. */
1597
- offline?: boolean;
1598
- /** Enable Microsoft SSO (MSAL). Only activates in a secure context (HTTPS/localhost). Default false. */
1599
- microsoftAuth: boolean;
1600
- /** MSAL credentials — required only when microsoftAuth is used. */
1601
- msal?: TinSpaMsalConfig;
1602
- /** Added: app-wide defaults applied to every spa-table that does not state its own value. */
1603
- tableDefaults?: TinSpaTableDefaults;
1604
- }
1605
- declare const TIN_SPA_RUNTIME_CONFIG: InjectionToken<TinSpaRuntimeConfig>;
1606
1578
  declare function tinSpaLocationStrategyFactory(platformLocation: PlatformLocation, baseHref: string, config: TinSpaRuntimeConfig): LocationStrategy;
1607
1579
  /** Overlays assets/appsettings.json values (when the app loaded one) onto the code-declared config. */
1608
1580
  declare function tinSpaRuntimeConfigFactory(codeConfig: TinSpaRuntimeConfig): TinSpaRuntimeConfig;
@@ -2009,6 +1981,7 @@ declare class DataServiceLib {
2009
1981
  capPositions: CapItem;
2010
1982
  capUnlock: CapItem;
2011
1983
  capReferenceData: CapItem;
1984
+ capPersonnelDirectory: CapItem;
2012
1985
  capGrades: CapItem;
2013
1986
  capPayroll: CapItem;
2014
1987
  capSalaryStructures: CapItem;
@@ -2101,6 +2074,10 @@ declare class DataServiceLib {
2101
2074
  }[];
2102
2075
  employeeFormConfig: FormConfig;
2103
2076
  editEmployeeButton: Button;
2077
+ payslipTabDetailsConfig: DetailsDialogConfig;
2078
+ employeeDetailsConfig: DetailsDialogConfig;
2079
+ userCardFormConfig: FormConfig;
2080
+ userDetailsConfig: DetailsDialogConfig;
2104
2081
  employeesTableConfig: TableConfig;
2105
2082
  positionsTableConfig: TableConfig;
2106
2083
  departmentTableConfig: TableConfig;
@@ -2637,6 +2614,7 @@ declare class AccountingService {
2637
2614
 
2638
2615
  declare class ConfigService {
2639
2616
  private dataService;
2617
+ private injector?;
2640
2618
  private config;
2641
2619
  config$: rxjs.Observable<any>;
2642
2620
  get value(): any;
@@ -2644,7 +2622,10 @@ declare class ConfigService {
2644
2622
  private inFlight;
2645
2623
  private failedAttempts;
2646
2624
  private static readonly maxFailedAttempts;
2647
- constructor(dataService: DataServiceLib);
2625
+ private waiting?;
2626
+ constructor(dataService: DataServiceLib, injector?: Injector);
2627
+ private gate;
2628
+ private waitForToken;
2648
2629
  load(force?: boolean): void;
2649
2630
  refresh(): void;
2650
2631
  clear(): void;
@@ -2856,10 +2837,12 @@ declare class SubscriptionService {
2856
2837
  private enabledFeaturesSource;
2857
2838
  enabledFeatures$: rxjs.Observable<string[]>;
2858
2839
  private featuresLoaded;
2840
+ private gateMode;
2859
2841
  constructor(httpService: HttpService, authService: AuthService);
2860
2842
  loadFeatures(): void;
2861
2843
  isFeatureEnabled(featureKey: string): boolean;
2862
2844
  isModuleEnabled(featureKey: string): boolean;
2845
+ isEnforcing(): boolean;
2863
2846
  clearFeatures(): void;
2864
2847
  get loaded(): boolean;
2865
2848
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
@@ -2928,6 +2911,8 @@ declare class PayrollService {
2928
2911
  payslipLineFormConfig: FormConfig;
2929
2912
  payslipLinesTableConfig: TableConfig;
2930
2913
  payslipFormConfig: FormConfig;
2914
+ payslipDetailsConfig: DetailsDialogConfig;
2915
+ viewPayslipButton: Button;
2931
2916
  payslipsChildTableConfig: TableConfig;
2932
2917
  employeePayslipHistoryTableConfig: TableConfig;
2933
2918
  employeeSalaryComponentFormConfig: FormConfig;
@@ -2952,6 +2937,12 @@ declare class PayrollService {
2952
2937
  salaryAdvanceFormConfig: FormConfig;
2953
2938
  salaryAdvancesTableConfig: TableConfig;
2954
2939
  employeeSalaryAdvancesTableConfig: TableConfig;
2940
+ employeeBalanceRecoveriesTableConfig: TableConfig;
2941
+ employeeBalanceFormConfig: FormConfig;
2942
+ writeOffBalanceButton: Button;
2943
+ employeeBalanceDetailsConfig: DetailsDialogConfig;
2944
+ employeeBalancesTableConfig: TableConfig;
2945
+ employeeEmployeeBalancesTableConfig: TableConfig;
2955
2946
  overtimeEntryFormConfig: FormConfig;
2956
2947
  overtimeEntriesTableConfig: TableConfig;
2957
2948
  employeeOvertimeHistoryTableConfig: TableConfig;
@@ -3099,5 +3090,5 @@ declare class SpaCoreModule {
3099
3090
  static ɵinj: i0.ɵɵInjectorDeclaration<SpaCoreModule>;
3100
3091
  }
3101
3092
 
3102
- export { Account, AccountingService, Action, AlertConfig, AlertMessage, ApiErrorService, ApiResponse, AppConfig, AssetStatus, AuthService, BottomTab, CacheConfig, CapItem, ChangeUserPassword, ChartConfig, ConfigService, Constants, Core, CreditNoteStatus, DashboardConfig, DataServiceLib, DateBounds, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, FilterChipConfig, FiscalPeriodStatus, FormConfig, GRID_MENU_ROUTE, GRID_MENU_TAB, GeneralService, HttpService, InventoryService, InvoiceItemType, InvoiceStatus, LastRouteService, ListDialogConfig, LoansService, LogLevel, LogService, MenuSourceService, MessageService, MovementType, NotesConfig, NotificationsService, OfflineService, PageConfig, PaginationConfig, PayrollService, PreferencesService, PrivacyDialogComponent, ProductionService, Profile, PurchaseStatus, PurchasingService, QuoteStatus, REDACTED, ReceiptDialogComponent, ReceiptStatus, RedactingSignalRLogger, Register, Role, RoleAccess, SalesService, SearchConfig, SecurityConfig, SetupService, SignalRService, SignupData, SpaCoreModule, SpaMatModule, Step, StepConfig, StorageService, SubscriptionService, SuffixComponent, TIN_INLINE_ERRORS, TIN_LOGIN_TIER_HTTP_PROVIDERS, TIN_SILENT_REQUEST, TIN_SPA_RUNTIME_CONFIG, TableConfig, TermsDialogComponent, TextComponent, TextMaskComponent, TileConfig, TransactionTiming, UnitOfMeasure, User, derivePlaceholder, describeError, describeShape, dialogOptions, getTinSpaAppSettings, isInlineErrorRequest, isSilentRequest, loadTinSpaAppSettings, loginConfig, messageDialog, phraseSatisfied, provideTinSpaRuntime, redactSecrets, silentContext, tinRequestContext, tinSpaLocationStrategyFactory, tinSpaRuntimeConfigFactory };
3103
- export type { ApiErrorInfo, ApiErrorKind, AppConfigSection, AppConfigurationConfig, AppFailureClass, AppFailureContext, AutoRefreshConfig, BitwiseOption, Button, CacheRule, CapsuleConfig, CardConfig, ChartItem, ChecklistAction, ChecklistConfig, ChecklistItem, ChildField, CloseOptions, Color, Column, Confirm, CreateTabConfig, DashboardSection, DayBookButtonView, DayBookColumnPresentation, DayBookColumnView, DayBookConfig, DayBookLane, DayBookPresentation, DayBookSection, DayBookStage, DayBookStageTiles, DayBookTableView, DocumentError, DocumentKind, DocumentSource, DocumentViewerData, EntityChangeEvent, EntityInvalidatedEvent, Field, FilterChip, GroupConfig, GroupData, Icon, ImportConfig, InlineEditConfig, InlineLoadError, LoadedDocument, MenuSection, NoAccessInfo, NotificationEvent, OfflineConfig, OfflineEntry, OfflineOpStatus, OrderableConfig, OutboxOp, PlaceholderKind, RefreshResult, SearchField, SetupApprovalPreset, SetupConfig, SetupModule, SetupNotificationPreset, SetupPreset, SetupPresetCatalog, SetupPresetRole, SetupPresetSelection, SetupRoleTemplate, SetupSeedOffer, SetupStatus, SetupStep, SetupStepAction, SpaChartType, StatusConfig, StatusItem, StatusState, TableDialogConfig, TableSectionChip, TableSectionConfig, TableViewType, Tile, TileChartConfig, TileChartType, TileStyle, TinSpaAppSettings, TinSpaMsalConfig, TinSpaMsalSettings, TinSpaRuntimeConfig, TinSpaTableDefaults, UserPreferences, VehiclePositionFrame, VisibilityValue };
3093
+ export { Account, AccountingService, Action, AlertConfig, AlertMessage, ApiErrorService, ApiResponse, AppConfig, AssetStatus, AuthService, BottomTab, CacheConfig, CapItem, ChangeUserPassword, ChartConfig, ConfigService, Constants, Core, CreditNoteStatus, DashboardConfig, DataServiceLib, DateBounds, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, FilterChipConfig, FiscalPeriodStatus, FormConfig, GRID_MENU_ROUTE, GRID_MENU_TAB, GeneralService, HttpService, InventoryService, InvoiceItemType, InvoiceStatus, LastRouteService, ListDialogConfig, LoansService, LogLevel, LogService, MenuSourceService, MessageService, MovementType, NotesConfig, NotificationsService, OfflineService, PageConfig, PaginationConfig, PayrollService, PreferencesService, PrivacyDialogComponent, ProductionService, Profile, PurchaseStatus, PurchasingService, QuoteStatus, REDACTED, ReceiptDialogComponent, ReceiptStatus, RedactingSignalRLogger, Register, Role, RoleAccess, SalesService, SearchConfig, SecurityConfig, SetupService, SignalRService, SignupData, SpaCoreModule, SpaMatModule, Step, StepConfig, StorageService, SubscriptionService, SuffixComponent, TIN_INLINE_ERRORS, TIN_LOGIN_TIER_HTTP_PROVIDERS, TIN_SILENT_REQUEST, TableConfig, TermsDialogComponent, TextComponent, TextMaskComponent, TileConfig, TransactionTiming, UnitOfMeasure, User, derivePlaceholder, describeError, describeShape, dialogOptions, getTinSpaAppSettings, isInlineErrorRequest, isSilentRequest, loadTinSpaAppSettings, loginConfig, messageDialog, phraseSatisfied, provideTinSpaRuntime, redactSecrets, silentContext, tinRequestContext, tinSpaLocationStrategyFactory, tinSpaRuntimeConfigFactory };
3094
+ export type { ApiErrorInfo, ApiErrorKind, AppConfigSection, AppConfigurationConfig, AppFailureClass, AppFailureContext, AutoRefreshConfig, BitwiseOption, Button, CacheRule, CapsuleConfig, CardConfig, ChartItem, ChecklistAction, ChecklistConfig, ChecklistItem, ChildField, CloseOptions, Color, Column, Confirm, CreateTabConfig, DashboardSection, DayBookButtonView, DayBookColumnPresentation, DayBookColumnView, DayBookConfig, DayBookLane, DayBookPresentation, DayBookSection, DayBookStage, DayBookStageTiles, DayBookTableView, DocumentError, DocumentKind, DocumentSource, DocumentViewerData, EntityChangeEvent, EntityInvalidatedEvent, Field, FilterChip, GroupConfig, GroupData, Icon, ImportConfig, InlineEditConfig, InlineLoadError, LoadedDocument, MenuSection, NoAccessInfo, NotificationEvent, OfflineConfig, OfflineEntry, OfflineOpStatus, OrderableConfig, OutboxOp, PlaceholderKind, RefreshResult, SearchField, SetupApprovalPreset, SetupConfig, SetupModule, SetupNotificationPreset, SetupPreset, SetupPresetCatalog, SetupPresetRole, SetupPresetSelection, SetupRoleTemplate, SetupSeedOffer, SetupStatus, SetupStep, SetupStepAction, SpaChartType, StatusConfig, StatusItem, StatusState, TableDialogConfig, TableSectionChip, TableSectionConfig, TableViewType, Tile, TileChartConfig, TileChartType, TileStyle, TinSpaAppSettings, TinSpaMsalSettings, UserPreferences, VehiclePositionFrame, VisibilityValue };
@@ -4,7 +4,7 @@ import * as i1$2 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
5
  import * as i1 from 'tin-spa/core';
6
6
  import { AccountingService, MessageService, ApiErrorService, PurchasingService, HttpService, DataServiceLib, ReceiptDialogComponent } from 'tin-spa/core';
7
- import { T as TilesComponent, a as TabsComponent, P as PageComponent, D as DateComponent, b as TableComponent, S as SelectLiteComponent, c as TinSpaModule, C as ChartsComponent, d as TenantTransferService, e as SpaAdminModule } from './tin-spa-tin-spa-BMy59BVn.mjs';
7
+ import { T as TilesComponent, a as TabsComponent, P as PageComponent, D as DateComponent, b as TableComponent, S as SelectLiteComponent, c as TinSpaModule, C as ChartsComponent, d as TenantTransferService, f as featureGuard, e as SpaAdminModule } from './tin-spa-tin-spa-DhI6eeit.mjs';
8
8
  import * as i1$1 from '@angular/common';
9
9
  import { CommonModule } from '@angular/common';
10
10
  import * as i3 from '@angular/material/button';
@@ -2089,32 +2089,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
2089
2089
  // credit notes, receipts, revenue schedules, aging, statements
2090
2090
  // purchasing -> capSupplierAging (:520) is a child of capPurchasingModule (:456) despite its accounting path
2091
2091
  // Everything left bare here is a capAccounting sub-item (:267) and correctly inherits the area's "accounting".
2092
+ // Added (plan-tier-enforcement P4.2): featureGuard('accounting') on the leaves, and WHY IT COVERS BUDGETS AND
2093
+ // QUOTES — the point that reads like a contradiction until you separate the two key vocabularies.
2094
+ //
2095
+ // There are fifteen plan keys and they are not all the same KIND. Six are MODULE keys and the owner armed all
2096
+ // six (decision 4352, option A): accounting, payroll, hr, manufacturing, loans, approvals. Three are
2097
+ // FINE-GRAINED keys and the owner explicitly left those unarmed for now: sales.quotes,
2098
+ // accounting.fixed-assets, accounting.budgets.
2099
+ //
2100
+ // 'accounting.budgets is unarmed' therefore does NOT mean 'the budgets page is ungated'. It means budgets are
2101
+ // not charged for SEPARATELY. On the server, BudgetsController, BudgetLinesController, QuotesController,
2102
+ // QuoteItemsController, QuotableServicesController and QuotableServiceRatesController all sit in
2103
+ // TinErp/Controllers/Accounting and every one of them now declares FeatureKey "accounting". So a tenant without
2104
+ // the accounting module is refused their data by the API, and the route must say the same thing or the user
2105
+ // reaches a page whose every request is going to be refused — which is the exact failure this guard exists to
2106
+ // prevent. Guarding them with 'accounting' is what MATCHES the server; leaving them bare would not.
2107
+ //
2108
+ // The genuinely ungated case is fixed-assets, and the difference is not a judgement call: its controllers live
2109
+ // in TinErp/Controllers/Assets, which the matrix armed with NOTHING at all. Its routes are in
2110
+ // assets-routing.module.ts and they carry no guard, deliberately. A route may never refuse what the server
2111
+ // still serves.
2112
+ //
2113
+ // Two leaves below are excluded for the same reason read the other way, and both were checked by grepping the
2114
+ // page components' own url: strings rather than assumed from the folder they sit in:
2115
+ // supplier-aging calls purchases/* — a Purchasing controller, and 'purchasing' is a FREE-plan key. Guarding
2116
+ // it with 'accounting' would refuse a page every tenant is entitled to.
2117
+ // tenant-transfers is CrossTenantTransfersController, a plain ControllerBase in Tenancy with no gate site at
2118
+ // all, and never armed.
2092
2119
  const ACCOUNTING_ROUTES = [
2093
- { path: "accounts", component: AccountsComponent },
2094
- { path: "aggregates", component: AggregatesComponent },
2095
- { path: "transaction-types", component: TransactionTypesComponent },
2096
- { path: "transactions", component: TransactionsComponent },
2097
- { path: "invoices", component: InvoicesComponent, data: { moduleKey: 'invoicing' } }, // Added (F3): Invoicing, not Accounting
2098
- { path: "aging", component: AgingComponent, data: { moduleKey: 'invoicing', capName: 'cap58' } }, // Added (F3): capAging is a capInvoicing sub-item // Changed: added INERT capName — nothing in this library reads it; cap58 is capAging, whose menu link is exactly "home/accounting/aging" (datalib.service.ts:489,491). A consumer that attaches capabilityGuard() in its OWN route table refuses the deep link; an app that never adds that line is unaffected
2120
+ { path: "accounts", component: AccountsComponent, canActivate: [featureGuard('accounting')] },
2121
+ { path: "aggregates", component: AggregatesComponent, canActivate: [featureGuard('accounting')] },
2122
+ { path: "transaction-types", component: TransactionTypesComponent, canActivate: [featureGuard('accounting')] },
2123
+ { path: "transactions", component: TransactionsComponent, canActivate: [featureGuard('accounting')] },
2124
+ { path: "invoices", component: InvoicesComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Added (F3): Invoicing, not Accounting
2125
+ { path: "aging", component: AgingComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing', capName: 'cap58' } }, // Added (F3): capAging is a capInvoicing sub-item // Changed: added INERT capName — nothing in this library reads it; cap58 is capAging, whose menu link is exactly "home/accounting/aging" (datalib.service.ts:489,491). A consumer that attaches capabilityGuard() in its OWN route table refuses the deep link; an app that never adds that line is unaffected
2099
2126
  { path: "supplier-aging", component: SupplierAgingComponent, data: { moduleKey: 'purchasing', capName: 'cap63' } }, // Added (F3): AP Aging belongs to Purchasing // Changed: added INERT capName — cap63 is capSupplierAging, menu link exactly "home/accounting/supplier-aging" (datalib.service.ts:597,599)
2100
- { path: "statements", component: StatementComponent, data: { moduleKey: 'invoicing' } }, // Added (F3): customer statement is an Invoicing page
2101
- { path: "reports", component: ReportsComponent },
2102
- { path: "tax-rates", component: TaxRatesComponent },
2103
- { path: "standing-orders", component: StandingOrdersComponent },
2104
- { path: "currencies", component: CurrenciesComponent }, // Changed: Removed Fixed Assets routes — moved to Assets module
2105
- { path: "budgets", component: BudgetsComponent },
2106
- { path: "budget-vs-actual", component: BudgetVsActualComponent },
2107
- { path: "dashboard", component: AccountingDashboardComponent },
2108
- { path: "invoice-dashboard", component: InvoiceDashboardComponent, data: { moduleKey: 'invoicing' } }, // Added (F3): Invoicing dashboard
2109
- { path: "credit-notes", component: CreditNotesComponent, data: { moduleKey: 'invoicing' } }, // Changed: Credit notes route (B6) // Added (F3)
2110
- { path: "vat-return", component: VatReturnComponent }, // Changed: VAT return route (B2)
2111
- { path: "fiscal-periods", component: FiscalPeriodsComponent }, // Changed: Fiscal periods route (C2)
2112
- { path: "receipts", component: ReceiptsComponent, data: { moduleKey: 'invoicing' } }, // Changed: Customer receipts route (C3) // Added (F3)
2113
- { path: "bank-reconciliation", component: BankReconciliationComponent }, // Changed: Bank reconciliation route (C4)
2127
+ { path: "statements", component: StatementComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Added (F3): customer statement is an Invoicing page
2128
+ { path: "reports", component: ReportsComponent, canActivate: [featureGuard('accounting')] },
2129
+ { path: "tax-rates", component: TaxRatesComponent, canActivate: [featureGuard('accounting')] },
2130
+ { path: "standing-orders", component: StandingOrdersComponent, canActivate: [featureGuard('accounting')] },
2131
+ { path: "currencies", component: CurrenciesComponent, canActivate: [featureGuard('accounting')] }, // Changed: Removed Fixed Assets routes — moved to Assets module
2132
+ { path: "budgets", component: BudgetsComponent, canActivate: [featureGuard('accounting')] },
2133
+ { path: "budget-vs-actual", component: BudgetVsActualComponent, canActivate: [featureGuard('accounting')] },
2134
+ { path: "dashboard", component: AccountingDashboardComponent, canActivate: [featureGuard('accounting')] },
2135
+ { path: "invoice-dashboard", component: InvoiceDashboardComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Added (F3): Invoicing dashboard
2136
+ { path: "credit-notes", component: CreditNotesComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Changed: Credit notes route (B6) // Added (F3)
2137
+ { path: "vat-return", component: VatReturnComponent, canActivate: [featureGuard('accounting')] }, // Changed: VAT return route (B2)
2138
+ { path: "fiscal-periods", component: FiscalPeriodsComponent, canActivate: [featureGuard('accounting')] }, // Changed: Fiscal periods route (C2)
2139
+ { path: "receipts", component: ReceiptsComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Changed: Customer receipts route (C3) // Added (F3)
2140
+ { path: "bank-reconciliation", component: BankReconciliationComponent, canActivate: [featureGuard('accounting')] }, // Changed: Bank reconciliation route (C4)
2114
2141
  { path: "tenant-transfers", component: TenantTransfersComponent }, // Added (N11): Organisation Transfers
2115
- { path: "revenue-schedules", component: RevenueSchedulesComponent, data: { moduleKey: 'invoicing' } }, // Changed: Deferred revenue route (C7) // Added (F3)
2116
- { path: "quotes", component: QuotesComponent, data: { moduleKey: 'invoicing' } }, // Changed: Quotations route (C10) // Added (F3)
2117
- { path: "rate-card", component: RateCardComponent, data: { moduleKey: 'invoicing' } } // Added (quotations-suite): the rate card the guided quote builder prices from — same module key and same cap53 server gate as Quotations
2142
+ { path: "revenue-schedules", component: RevenueSchedulesComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Changed: Deferred revenue route (C7) // Added (F3)
2143
+ { path: "quotes", component: QuotesComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } }, // Changed: Quotations route (C10) // Added (F3)
2144
+ { path: "rate-card", component: RateCardComponent, canActivate: [featureGuard('accounting')], data: { moduleKey: 'invoicing' } } // Added (quotations-suite): the rate card the guided quote builder prices from — same module key and same cap53 server gate as Quotations
2118
2145
  ];
2119
2146
  class AccountingRoutingModule {
2120
2147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AccountingRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -2216,4 +2243,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
2216
2243
  }] });
2217
2244
 
2218
2245
  export { AccountingModule };
2219
- //# sourceMappingURL=tin-spa-accounting.module-CamqAeW_.mjs.map
2246
+ //# sourceMappingURL=tin-spa-accounting.module-MuYH__EY.mjs.map