ca-components 0.0.41 → 0.0.43

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 (59) hide show
  1. package/esm2022/lib/components/ca-filters/ca-filter.component.mjs +44 -4
  2. package/esm2022/lib/components/ca-filters/components/ca-dispatcher-filter/ca-dispatcher-filter.component.mjs +12 -5
  3. package/esm2022/lib/components/ca-filters/components/ca-dispatcher-filter/config/ca-broker-filter.config.mjs +15 -0
  4. package/esm2022/lib/components/ca-filters/components/ca-pm-filter/ca-pm-filter.component.mjs +4 -4
  5. package/esm2022/lib/components/ca-filters/components/ca-time-filter/ca-time-filter.component.mjs +13 -7
  6. package/esm2022/lib/components/ca-filters/pipes/filter-conditions-clear.pipe.mjs +6 -1
  7. package/esm2022/lib/components/ca-filters/pipes/filter-conditions-set.pipe.mjs +8 -1
  8. package/esm2022/lib/components/ca-filters/pipes/filter-popover-conditions.pipe.mjs +8 -3
  9. package/esm2022/lib/components/ca-filters/utils/constants/directive.constants.mjs +125 -8
  10. package/esm2022/lib/components/ca-filters/utils/constants/time-filter.constants.mjs +59 -2
  11. package/esm2022/lib/components/ca-map/enums/toolbar-filter-string.enum.mjs +8 -1
  12. package/esm2022/lib/components/ca-period-content/ca-period-content.component.mjs +27 -20
  13. package/esm2022/lib/components/ca-period-content/components/ca-period-content-extra-info/ca-period-content-extra-info.component.mjs +6 -3
  14. package/esm2022/lib/components/ca-period-content/components/ca-period-content-payment/ca-period-content-payment.component.mjs +25 -44
  15. package/esm2022/lib/components/ca-period-content/components/ca-period-content-user-info/ca-period-content-user-info.component.mjs +6 -7
  16. package/esm2022/lib/components/ca-period-content/components/index.mjs +4 -0
  17. package/esm2022/lib/components/ca-period-content/enums/index.mjs +2 -0
  18. package/esm2022/lib/components/ca-period-content/models/driver-info.mjs +1 -1
  19. package/esm2022/lib/components/ca-period-content/models/extra-payments.mjs +1 -1
  20. package/esm2022/lib/components/ca-period-content/models/index.mjs +33 -0
  21. package/esm2022/lib/components/ca-period-content/models/payroll-bonus-response.mjs +1 -1
  22. package/esm2022/lib/components/ca-period-content/models/payroll-credit-response.mjs +1 -1
  23. package/esm2022/lib/components/ca-period-content/models/payroll-deduction-response.mjs +1 -1
  24. package/esm2022/lib/components/ca-period-content/models/payroll-fuel-minimal-response.mjs +1 -1
  25. package/esm2022/lib/components/ca-period-content/models/payroll-period-input.type.mjs +2 -0
  26. package/esm2022/lib/components/ca-period-content/utils/constants/index.mjs +3 -0
  27. package/esm2022/lib/components/ca-period-content/utils/helpers/index.mjs +2 -0
  28. package/esm2022/lib/components/ca-period-content/utils/helpers/payroll-period-content.helper.mjs +42 -66
  29. package/esm2022/lib/components/ca-period-content/utils/svg-routes/index.mjs +2 -0
  30. package/esm2022/lib/components/ca-profile-image/ca-profile-image.component.mjs +3 -3
  31. package/fesm2022/ca-components.mjs +393 -160
  32. package/fesm2022/ca-components.mjs.map +1 -1
  33. package/lib/components/ca-filters/ca-filter.component.d.ts +2 -1
  34. package/lib/components/ca-filters/components/ca-dispatcher-filter/config/ca-broker-filter.config.d.ts +4 -0
  35. package/lib/components/ca-filters/components/ca-time-filter/ca-time-filter.component.d.ts +3 -4
  36. package/lib/components/ca-filters/utils/constants/directive.constants.d.ts +2 -0
  37. package/lib/components/ca-filters/utils/constants/time-filter.constants.d.ts +13 -1
  38. package/lib/components/ca-map/enums/toolbar-filter-string.enum.d.ts +6 -0
  39. package/lib/components/ca-period-content/ca-period-content.component.d.ts +13 -10
  40. package/lib/components/ca-period-content/components/ca-period-content-extra-info/ca-period-content-extra-info.component.d.ts +2 -1
  41. package/lib/components/ca-period-content/components/ca-period-content-payment/ca-period-content-payment.component.d.ts +11 -10
  42. package/lib/components/ca-period-content/components/ca-period-content-user-info/ca-period-content-user-info.component.d.ts +4 -5
  43. package/lib/components/ca-period-content/components/index.d.ts +3 -0
  44. package/lib/components/ca-period-content/enums/index.d.ts +1 -0
  45. package/lib/components/ca-period-content/models/driver-info.d.ts +1 -1
  46. package/lib/components/ca-period-content/models/extra-payments.d.ts +20 -5
  47. package/lib/components/ca-period-content/models/index.d.ts +32 -0
  48. package/lib/components/ca-period-content/models/payroll-bonus-response.d.ts +1 -1
  49. package/lib/components/ca-period-content/models/payroll-credit-response.d.ts +1 -1
  50. package/lib/components/ca-period-content/models/payroll-deduction-response.d.ts +1 -1
  51. package/lib/components/ca-period-content/models/payroll-fuel-minimal-response.d.ts +1 -1
  52. package/lib/components/ca-period-content/models/payroll-period-input.type.d.ts +39 -0
  53. package/lib/components/ca-period-content/utils/constants/index.d.ts +2 -0
  54. package/lib/components/ca-period-content/utils/helpers/index.d.ts +1 -0
  55. package/lib/components/ca-period-content/utils/helpers/payroll-period-content.helper.d.ts +7 -8
  56. package/lib/components/ca-period-content/utils/svg-routes/index.d.ts +1 -0
  57. package/lib/components/ca-profile-image/ca-profile-image.component.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/src/assets/ca-components/svg/common/ic_label.svg +3 -0
@@ -27,6 +27,7 @@ export declare class CaFilterComponent implements OnDestroy {
27
27
  caTrailerTypeFilter: CaTrailerTypeFilterComponent;
28
28
  caPmFilter: CaPmFilterComponent;
29
29
  type: string;
30
+ timeSubType: string;
30
31
  subType: string;
31
32
  unselectedUser: ArrayStatus[];
32
33
  loadStatusOptionsArray: ArrayStatus[];
@@ -69,5 +70,5 @@ export declare class CaFilterComponent implements OnDestroy {
69
70
  getSvgPath(propertyName: keyof typeof CaFiltersSvgRoutes): string;
70
71
  ngOnDestroy(): void;
71
72
  static ɵfac: i0.ɵɵFactoryDeclaration<CaFilterComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<CaFilterComponent, "app-ca-filter", never, { "type": { "alias": "type"; "required": false; }; "subType": { "alias": "subType"; "required": false; }; "unselectedUser": { "alias": "unselectedUser"; "required": false; }; "loadStatusOptionsArray": { "alias": "loadStatusOptionsArray"; "required": false; }; "truckTypeArray": { "alias": "truckTypeArray"; "required": false; }; "trailerTypeArray": { "alias": "trailerTypeArray"; "required": false; }; "pmFilterArray": { "alias": "pmFilterArray"; "required": false; }; "isRepairFilter": { "alias": "isRepairFilter"; "required": false; }; "isDefFilterHolder": { "alias": "isDefFilterHolder"; "required": false; }; "hasNoLeftIcon": { "alias": "hasNoLeftIcon"; "required": false; }; "hasLeftSideIcon": { "alias": "hasLeftSideIcon"; "required": false; }; "hasLargeLeftIcon": { "alias": "hasLargeLeftIcon"; "required": false; }; "isMoneyFilter": { "alias": "isMoneyFilter"; "required": false; }; "isFuelType": { "alias": "isFuelType"; "required": false; }; "isLoadType": { "alias": "isLoadType"; "required": false; }; "filterTitle": { "alias": "filterTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "setFilter": "setFilter"; "clearAll": "clearAll"; }, never, never, true, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<CaFilterComponent, "app-ca-filter", never, { "type": { "alias": "type"; "required": false; }; "timeSubType": { "alias": "timeSubType"; "required": false; }; "subType": { "alias": "subType"; "required": false; }; "unselectedUser": { "alias": "unselectedUser"; "required": false; }; "loadStatusOptionsArray": { "alias": "loadStatusOptionsArray"; "required": false; }; "truckTypeArray": { "alias": "truckTypeArray"; "required": false; }; "trailerTypeArray": { "alias": "trailerTypeArray"; "required": false; }; "pmFilterArray": { "alias": "pmFilterArray"; "required": false; }; "isRepairFilter": { "alias": "isRepairFilter"; "required": false; }; "isDefFilterHolder": { "alias": "isDefFilterHolder"; "required": false; }; "hasNoLeftIcon": { "alias": "hasNoLeftIcon"; "required": false; }; "hasLeftSideIcon": { "alias": "hasLeftSideIcon"; "required": false; }; "hasLargeLeftIcon": { "alias": "hasLargeLeftIcon"; "required": false; }; "isMoneyFilter": { "alias": "isMoneyFilter"; "required": false; }; "isFuelType": { "alias": "isFuelType"; "required": false; }; "isLoadType": { "alias": "isLoadType"; "required": false; }; "filterTitle": { "alias": "filterTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "setFilter": "setFilter"; "clearAll": "clearAll"; }, never, never, true, never>;
73
74
  }
@@ -0,0 +1,4 @@
1
+ import { ICaInput } from '../../../../ca-input/config/ca-input.config';
2
+ export declare class CaBrokerFilterConfig {
3
+ static getBrokerSearch(): ICaInput;
4
+ }
@@ -1,12 +1,12 @@
1
- import { OnDestroy, OnInit, Renderer2 } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { CaFiltersSvgRoutes } from '../../utils/svg-routes/ca-filters-svg-routes';
3
3
  import { filterOutput } from '../../../../models/filter-output.model';
4
4
  import { filterOutputWithParams } from '../../../../models/filter-output-params.model';
5
5
  import { TimeFilterOptions } from '../../../../models/time-filter.model';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class CaTimeFilterComponent implements OnInit, OnDestroy {
8
- private renderer;
9
8
  type: string;
9
+ timeSubType: string;
10
10
  isFilterActive: boolean;
11
11
  private destroy$;
12
12
  selectedTimeValue: string;
@@ -16,7 +16,6 @@ export declare class CaTimeFilterComponent implements OnInit, OnDestroy {
16
16
  lastYear: number | null;
17
17
  last2Years: number | null;
18
18
  timeOptionsArray: TimeFilterOptions[];
19
- constructor(renderer: Renderer2);
20
19
  ngOnInit(): void;
21
20
  trackByIndex(index: number): number;
22
21
  private timeFilterInit;
@@ -32,5 +31,5 @@ export declare class CaTimeFilterComponent implements OnInit, OnDestroy {
32
31
  getSvgPath(propertyName: keyof typeof CaFiltersSvgRoutes): string;
33
32
  ngOnDestroy(): void;
34
33
  static ɵfac: i0.ɵɵFactoryDeclaration<CaTimeFilterComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<CaTimeFilterComponent, "app-ca-time-filter", never, { "type": { "alias": "type"; "required": false; }; "isFilterActive": { "alias": "isFilterActive"; "required": false; }; }, {}, never, never, true, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<CaTimeFilterComponent, "app-ca-time-filter", never, { "type": { "alias": "type"; "required": false; }; "timeSubType": { "alias": "timeSubType"; "required": false; }; "isFilterActive": { "alias": "isFilterActive"; "required": false; }; }, {}, never, never, true, never>;
36
35
  }
@@ -3,6 +3,7 @@ export declare class DirectiveConstants {
3
3
  static UNSELECTED_USER: ArrayStatus[];
4
4
  static DRIVER_ARRAY: ArrayStatus[];
5
5
  static FUEL_STOP_ARRAY: ArrayStatus[];
6
+ static BROKER_ARRAY: ArrayStatus[];
6
7
  static USA_STATES: ArrayStatus[];
7
8
  static CANADA_STATES: ArrayStatus[];
8
9
  static TRUCK_TYPE_ARRAY: ArrayStatus[];
@@ -14,4 +15,5 @@ export declare class DirectiveConstants {
14
15
  static PARKING_ARRAY: ArrayStatus[];
15
16
  static TAG_ARRAY: ArrayStatus[];
16
17
  static ACTION_ARRAY: ArrayStatus[];
18
+ static LABEL_ARRAY: ArrayStatus[];
17
19
  }
@@ -1,5 +1,17 @@
1
1
  export declare class TimeFilterConstants {
2
- static getTimeFilterOptions(lastYear: string, last2Years: string): {
2
+ static getTimePastOptions(lastYear: string, last2Years: string): {
3
+ label: string;
4
+ items: {
5
+ label: string;
6
+ }[];
7
+ }[];
8
+ static getTimeFutureOptions(): {
9
+ label: string;
10
+ items: {
11
+ label: string;
12
+ }[];
13
+ }[];
14
+ static getTimeShortOptions(): {
3
15
  label: string;
4
16
  items: {
5
17
  label: string;
@@ -34,6 +34,7 @@ export declare enum ToolbarFilterStringEnum {
34
34
  DISPATCHER_FILTER_2 = "Dispatcher Filter",
35
35
  DRIVER_FILTER_2 = "Driver Filter",
36
36
  FUEL_STOP_FILTER_2 = "Fuel Stop Filter",
37
+ BROKER_FILTER_2 = "Broker Filter",
37
38
  USER_FILTER_2 = "Dispatcher Filter",
38
39
  STATE_FILTER_2 = "State / Province Filter",
39
40
  TRUCK_TYPE_FILTER_2 = "Truck Type Filter",
@@ -45,6 +46,10 @@ export declare enum ToolbarFilterStringEnum {
45
46
  PARKING_FILTER_2 = "Parking Filter",
46
47
  TAG_FILTER_2 = "Tag Filter",
47
48
  ACTION_FILTER_2 = "Action Filter",
49
+ LABEL_FILTER_2 = "Label Filter",
50
+ PAST = "past",
51
+ FUTURE = "future",
52
+ SHORT = "short",
48
53
  DOLLAR = "dollar",
49
54
  BROKER_HALF_CIRCLE = "broker-half-circle",
50
55
  TIME = "ic_time",
@@ -55,6 +60,7 @@ export declare enum ToolbarFilterStringEnum {
55
60
  DEFAULT_PM = "default_pm",
56
61
  IC_KEY_REPAIR = "ic_key-repair",
57
62
  FUEL = "fuel",
63
+ LABEL = "label",
58
64
  MAIN_TOOLTIP = "mainTooltip",
59
65
  CLOSE_FILTER = "Close Filter",
60
66
  REMOVE_FILTER = "Remove Filter",
@@ -1,15 +1,12 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { PeriodContentSvgRoutes } from '../ca-period-content/utils/svg-routes/period-content.routes';
3
- import { PayrollTypeEnum } from './enums/payroll-type.enum';
4
- import { ComponentData, PaymentComponentData } from './models/component-data.type';
5
- import { DriverInfo } from '../ca-period-content/models/driver-info';
6
- import { ExtraPayments } from '../ca-period-content/models/extra-payments';
2
+ import { PeriodContentSvgRoutes } from './utils/svg-routes';
3
+ import { PayrollTypeEnum } from './enums';
4
+ import { DriverInfo, ExtraPayments, PaymentComponentData, PayrollPeriodDriverResponse } from './models';
7
5
  import * as i0 from "@angular/core";
8
6
  export declare class CaPeriodContentComponent {
9
7
  isOpen: boolean;
10
8
  type: PayrollTypeEnum;
11
- componentData: ComponentData;
12
- status: string;
9
+ componentData: PayrollPeriodDriverResponse;
13
10
  reorderedDataEmiter: EventEmitter<PaymentComponentData | ExtraPayments>;
14
11
  salary: number;
15
12
  totalEarnings: number;
@@ -20,19 +17,25 @@ export declare class CaPeriodContentComponent {
20
17
  paymentStatus: string;
21
18
  driverInfo: DriverInfo;
22
19
  extraPayments: ExtraPayments;
20
+ extraStops: {
21
+ extraStopCount: number;
22
+ extraStopPay: number;
23
+ mileagePay: number;
24
+ };
23
25
  periodContentSvgRoutes: PeriodContentSvgRoutes;
24
26
  ngOnInit(): void;
25
27
  constructor();
26
- private getAllInfo;
28
+ private calculateSalaryAndTotalEarnings;
29
+ private setExtraStops;
30
+ private getDriverAndExtraPaymentsInfo;
27
31
  getAllPaymentSums(event: {
28
32
  sum: number;
29
33
  type: string;
30
34
  }): void;
31
- private calculateTotalEarnings;
32
35
  private setDebtTitle;
33
36
  processPayment(): void;
34
37
  addPayment(): void;
35
38
  getReorderedData(): void;
36
39
  static ɵfac: i0.ɵɵFactoryDeclaration<CaPeriodContentComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentComponent, "app-ca-period-content", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "type": { "alias": "type"; "required": false; }; "componentData": { "alias": "componentData"; "required": false; }; "status": { "alias": "status"; "required": false; }; }, { "reorderedDataEmiter": "reorderedDataEmiter"; }, never, never, true, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentComponent, "app-ca-period-content", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "type": { "alias": "type"; "required": false; }; "componentData": { "alias": "componentData"; "required": false; }; }, { "reorderedDataEmiter": "reorderedDataEmiter"; }, never, never, true, never>;
38
41
  }
@@ -2,6 +2,7 @@ import * as i0 from "@angular/core";
2
2
  export declare class CaPeriodContentExtraInfoComponent {
3
3
  title: string;
4
4
  amount: number;
5
+ stopsCount: number;
5
6
  static ɵfac: i0.ɵɵFactoryDeclaration<CaPeriodContentExtraInfoComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentExtraInfoComponent, "app-ca-period-content-extra-info", never, { "title": { "alias": "title"; "required": false; }; "amount": { "alias": "amount"; "required": false; }; }, {}, never, never, true, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentExtraInfoComponent, "app-ca-period-content-extra-info", never, { "title": { "alias": "title"; "required": false; }; "amount": { "alias": "amount"; "required": false; }; "stopsCount": { "alias": "stopsCount"; "required": false; }; }, {}, never, never, true, never>;
7
8
  }
@@ -1,19 +1,19 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { PeriodContentSvgRoutes } from '../../../../components/ca-period-content/utils/svg-routes/period-content.routes';
2
+ import { PeriodContentSvgRoutes } from '../../utils/svg-routes';
3
3
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
4
+ import { ComponentData, PaymentComponentData, PaymentSum } from '../../models';
4
5
  import { IItemList } from '../../../../models/dropdown.model';
5
- import { formattedComponentData } from '../../models/formatted-component-data.type';
6
- import { ComponentData, PaymentComponentData } from '../../models/component-data.type';
7
- import { PaymentSum } from '../../models/payment-sum.model';
8
6
  import * as i0 from "@angular/core";
9
7
  export declare class CaPeriodContentPaymentComponent implements OnInit {
10
8
  isOpen: boolean;
11
9
  title: string;
12
- componentData: PaymentComponentData;
10
+ componentData: {
11
+ included: PaymentComponentData;
12
+ excluded: PaymentComponentData;
13
+ };
13
14
  sumPaymentTypeEmitter: EventEmitter<PaymentSum>;
14
15
  reorderedDataEmiter: EventEmitter<PaymentComponentData>;
15
16
  sum: number;
16
- formattedComponentData: formattedComponentData[];
17
17
  hoverStates: boolean[];
18
18
  clickedStates: boolean[];
19
19
  private dropdownStates;
@@ -24,11 +24,14 @@ export declare class CaPeriodContentPaymentComponent implements OnInit {
24
24
  alternateIcon: string;
25
25
  currentIcon: string;
26
26
  currentIcons: string[];
27
+ included: PaymentComponentData;
28
+ excluded: PaymentComponentData;
27
29
  constructor();
28
30
  ngOnInit(): void;
29
- private setHoverOptions;
30
- private processInputData;
31
+ private setIncludedAndExcludedData;
31
32
  private setDropdownOptions;
33
+ private setHoverOptions;
34
+ calculateTotalPayment(): void;
32
35
  private setInitialIcons;
33
36
  dropDownClickEvent(index: number): void;
34
37
  isDropdownEnabled(loadNumber: number): boolean;
@@ -36,9 +39,7 @@ export declare class CaPeriodContentPaymentComponent implements OnInit {
36
39
  onMouseLeave(index: number): void;
37
40
  getColor(title: string): string;
38
41
  getTitleColor(): string;
39
- calculateTotalPayment(): void;
40
42
  onDrop(event: CdkDragDrop<ComponentData>): void;
41
- moveItem(previousIndex: number, currentIndex: number): void;
42
43
  getSvgPath(propertyName: keyof typeof PeriodContentSvgRoutes): string;
43
44
  identity(index: number): number;
44
45
  static ɵfac: i0.ɵɵFactoryDeclaration<CaPeriodContentPaymentComponent, never>;
@@ -1,7 +1,6 @@
1
- import { ComponentData } from '../../models/component-data.type';
2
- import { DriverInfo } from '../../models/driver-info';
3
- import { PeriodContentSvgRoutes } from '../../utils/svg-routes/period-content.routes';
4
- import { PayrollTypeEnum } from '../../enums/payroll-type.enum';
1
+ import { ComponentData, DriverInfo } from '../../models';
2
+ import { PeriodContentSvgRoutes } from '../../utils/svg-routes';
3
+ import { PayrollTypeEnum } from '../../enums';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class CaPeriodContentUserInfoComponent {
7
6
  componentData: ComponentData;
@@ -9,7 +8,7 @@ export declare class CaPeriodContentUserInfoComponent {
9
8
  paymentStatus: string;
10
9
  isOpen: boolean;
11
10
  userInfo: DriverInfo;
12
- status: string;
11
+ status: number;
13
12
  title: string;
14
13
  currentIcon: string;
15
14
  missingPicture: string;
@@ -0,0 +1,3 @@
1
+ export * from './ca-period-content-extra-info/ca-period-content-extra-info.component';
2
+ export * from './ca-period-content-payment/ca-period-content-payment.component';
3
+ export * from './ca-period-content-user-info/ca-period-content-user-info.component';
@@ -0,0 +1 @@
1
+ export * from './payroll-type.enum';
@@ -1,5 +1,5 @@
1
1
  export interface DriverInfo {
2
2
  fullName: string;
3
- driverAvatar?: string | undefined;
3
+ driverAvatar?: string;
4
4
  payrollNumber: string;
5
5
  }
@@ -4,9 +4,24 @@ import { PayrollDeductionResponse } from '../../ca-period-content/models/payroll
4
4
  import { PayrollPaymentResponse } from '../../ca-period-content/models/payroll-payment-response';
5
5
  import { PayrollFuelMinimalResponse } from '../../ca-period-content/models/payroll-fuel-minimal-response';
6
6
  export interface ExtraPayments {
7
- bonuses: Array<PayrollBonusResponse>;
8
- credits: Array<PayrollCreditResponse>;
9
- deductions: Array<PayrollDeductionResponse>;
10
- payments: Array<PayrollPaymentResponse>;
11
- fuels: Array<PayrollFuelMinimalResponse>;
7
+ bonuses: {
8
+ included: Array<PayrollBonusResponse>;
9
+ excluded: Array<PayrollBonusResponse>;
10
+ };
11
+ credits: {
12
+ included: Array<PayrollCreditResponse>;
13
+ excluded: Array<PayrollCreditResponse>;
14
+ };
15
+ deductions: {
16
+ included: Array<PayrollDeductionResponse>;
17
+ excluded: Array<PayrollDeductionResponse>;
18
+ };
19
+ payments: {
20
+ included: Array<PayrollPaymentResponse>;
21
+ excluded: Array<PayrollPaymentResponse>;
22
+ };
23
+ fuels: {
24
+ included: Array<PayrollFuelMinimalResponse>;
25
+ excluded: Array<PayrollFuelMinimalResponse>;
26
+ };
12
27
  }
@@ -0,0 +1,32 @@
1
+ export * from './component-data.type';
2
+ export * from './driver-info';
3
+ export * from './driver-minimal-response';
4
+ export * from './driver-short-response';
5
+ export * from './extra-payments';
6
+ export * from './formatted-component-data.type';
7
+ export * from './miles-stop-payroll-response';
8
+ export * from './notification-model';
9
+ export * from './payment-sum.model';
10
+ export * from './payroll-bonus-minimal-response';
11
+ export * from './payroll-bonus-response';
12
+ export * from './payroll-commission-total-sum';
13
+ export * from './payroll-credit-minimal-response';
14
+ export * from './payroll-credit-response';
15
+ export * from './payroll-deadline-period';
16
+ export * from './payroll-deadline-short-response';
17
+ export * from './payroll-deduction-minimal-response';
18
+ export * from './payroll-deduction-response';
19
+ export * from './payroll-driver-commission-by-id-response';
20
+ export * from './payroll-driver-flat-rate-closed-by-id-response';
21
+ export * from './payroll-driver-mileage-response';
22
+ export * from './payroll-flat-rate-total-sum';
23
+ export * from './payroll-fuel-minimal-response';
24
+ export * from './payroll-load-minimal-response';
25
+ export * from './payroll-load-stop-minimal-response';
26
+ export * from './payroll-map-location';
27
+ export * from './payroll-owner-closed-response';
28
+ export * from './payroll-owner-response';
29
+ export * from './payroll-payment-response';
30
+ export * from './payroll-payments-minimal-response';
31
+ export * from './payroll-period-input.type';
32
+ export * from './per-mile-model';
@@ -5,7 +5,7 @@ export interface PayrollBonusResponse {
5
5
  driver?: DriverMinimalResponse;
6
6
  date?: string;
7
7
  description?: string | null;
8
- amount?: number;
8
+ subtotal?: number;
9
9
  createdAt?: string;
10
10
  updatedAt?: string;
11
11
  }
@@ -11,7 +11,7 @@ export interface PayrollCreditResponse {
11
11
  truck?: TruckMinimalResponse;
12
12
  date?: string;
13
13
  description?: string | null;
14
- amount?: number;
14
+ subtotal?: number;
15
15
  createdAt?: string;
16
16
  updatedAt?: string;
17
17
  }
@@ -11,7 +11,7 @@ export interface PayrollDeductionResponse {
11
11
  truck?: TruckMinimalResponse;
12
12
  date?: string;
13
13
  description?: string | null;
14
- amount?: number;
14
+ subtotal?: number;
15
15
  recurringType?: EnumValue;
16
16
  currentRecurrance?: number | null;
17
17
  limitedNumber?: number | null;
@@ -3,6 +3,6 @@ export interface PayrollFuelMinimalResponse {
3
3
  description?: string | null;
4
4
  galons?: number;
5
5
  pricePerGalon?: number;
6
- amount?: number;
6
+ subtotal?: number;
7
7
  date?: string;
8
8
  }
@@ -0,0 +1,39 @@
1
+ import { PayrollCreditMinimalResponse } from './payroll-credit-minimal-response';
2
+ import { PayrollDeductionMinimalResponse } from './payroll-deduction-minimal-response';
3
+ import { PayrollLoadMinimalResponse } from './payroll-load-minimal-response';
4
+ import { PayrollBonusMinimalResponse } from './payroll-bonus-minimal-response';
5
+ import { FileResponse } from '../../../models/file-response';
6
+ export interface PayrollPeriodDriverResponse {
7
+ id?: number;
8
+ driverId?: number;
9
+ driverName?: string | null;
10
+ driverAvatar?: FileResponse | null;
11
+ periodStart?: string;
12
+ periodEnd?: string;
13
+ payrollNumber?: string | null;
14
+ daysUntilPayment: number;
15
+ mileagePay?: number;
16
+ totalEarnings?: number;
17
+ salary?: number | null;
18
+ extraStopPay?: number;
19
+ extraStopCount?: number;
20
+ loadCount?: number;
21
+ perMilesEntity?: {
22
+ emptyMile: number;
23
+ loadedMile: number;
24
+ perStop: number;
25
+ };
26
+ includedDeductions?: Array<PayrollDeductionMinimalResponse> | null;
27
+ excludedDeductions?: Array<PayrollDeductionMinimalResponse> | null;
28
+ totalDeduction?: number;
29
+ includedCredits?: Array<PayrollCreditMinimalResponse> | null;
30
+ excludedCredits?: Array<PayrollCreditMinimalResponse> | null;
31
+ totalCredits?: number;
32
+ includedBonus?: Array<PayrollBonusMinimalResponse> | null;
33
+ excludedBonus?: Array<PayrollBonusMinimalResponse> | null;
34
+ totalBonus?: number;
35
+ includedLoads?: Array<PayrollLoadMinimalResponse> | null;
36
+ excludedLoads?: Array<PayrollLoadMinimalResponse> | null;
37
+ mapLocations?: Array<any> | null;
38
+ sums?: any | null;
39
+ }
@@ -0,0 +1,2 @@
1
+ export * from './color-map';
2
+ export * from './payroll-period-dropdown.constant';
@@ -0,0 +1 @@
1
+ export * from './payroll-period-content.helper';
@@ -1,8 +1,6 @@
1
- import { ComponentData } from '../../models/component-data.type';
2
- import { ExtraPayments } from '../../../ca-period-content/models/extra-payments';
3
- import { DriverInfo } from '../../models/driver-info';
4
- import { PayrollTypeEnum } from '../../enums/payroll-type.enum';
5
- import { PeriodContentSvgRoutes } from '../svg-routes/period-content.routes';
1
+ import { ComponentData, DriverInfo, ExtraPayments, PayrollBonusResponse, PayrollCreditResponse, PayrollDeductionResponse, PayrollFuelMinimalResponse, PayrollPeriodDriverResponse } from '../../models';
2
+ import { PayrollTypeEnum } from '../../enums';
3
+ import { PeriodContentSvgRoutes } from '../svg-routes';
6
4
  export declare class PayrollPeriodContentHelper {
7
5
  static getSalary(componentData: ComponentData): number;
8
6
  static calculateTotalEarnings(componentData: ComponentData, paymentSums: {
@@ -13,20 +11,21 @@ export declare class PayrollPeriodContentHelper {
13
11
  debt: number;
14
12
  salary: number;
15
13
  };
14
+ static sumSubtotals(items: (PayrollBonusResponse | PayrollDeductionResponse | PayrollCreditResponse | PayrollFuelMinimalResponse)[]): number;
16
15
  static setDebtTitle(debt: number, totalEarnings: number): {
17
16
  debtTitle: string;
18
17
  isInDebt: boolean;
19
18
  paymentStatus: string;
20
19
  };
21
- static calculateDriverAndPaymentInfo(componentData: ComponentData, type: PayrollTypeEnum): {
20
+ static calculateDriverAndPaymentInfo(componentData: PayrollPeriodDriverResponse, type: PayrollTypeEnum): {
22
21
  driverInfo: DriverInfo;
23
22
  extraPayments: ExtraPayments;
24
23
  };
25
- private static setExtraPayments;
26
24
  private static extractDriverInfo;
25
+ private static extractExtraPayments;
27
26
  private static extractOwnerCommissionInfo;
28
27
  private static extractDriverOrOwnerInfo;
29
- static getIcon(status: string): {
28
+ static getIcon(status: number): {
30
29
  title: string;
31
30
  url: string;
32
31
  };
@@ -0,0 +1 @@
1
+ export * from './period-content.routes';
@@ -1,7 +1,7 @@
1
1
  import { OnInit } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class CaProfileImageComponent implements OnInit {
4
- avatarImg: string;
4
+ avatarImg: string | undefined;
5
5
  avatarColor: {
6
6
  background?: string;
7
7
  color?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ca-components",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0",
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0.900391 8.87837V2.42037C0.900391 2.0175 1.06043 1.63114 1.3453 1.34627C1.63016 1.0614 2.01653 0.901367 2.41939 0.901367H8.87739C9.28024 0.901418 9.66656 1.06149 9.95139 1.34637L16.6514 8.04637C16.9362 8.33123 17.0962 8.71755 17.0962 9.12037C17.0962 9.52318 16.9362 9.90951 16.6514 10.1944L10.2004 16.6564C9.91553 16.9412 9.52921 17.1012 9.12639 17.1012C8.72357 17.1012 8.33725 16.9412 8.05239 16.6564L1.35239 9.95637C1.20959 9.81544 1.09612 9.64761 1.01854 9.46259C0.940964 9.27756 0.900806 9.079 0.900391 8.87837V8.87837ZM4.44439 2.92637C4.14396 2.92637 3.85028 3.01546 3.60048 3.18236C3.35068 3.34927 3.15599 3.58651 3.04102 3.86407C2.92605 4.14163 2.89597 4.44705 2.95458 4.74171C3.01319 5.03637 3.15786 5.30703 3.3703 5.51946C3.58273 5.7319 3.85339 5.87657 4.14805 5.93518C4.44271 5.99379 4.74813 5.96371 5.02569 5.84874C5.30325 5.73377 5.54048 5.53908 5.70739 5.28928C5.8743 5.03948 5.96339 4.7458 5.96339 4.44537C5.96339 4.0425 5.80335 3.65614 5.51849 3.37127C5.23362 3.0864 4.84725 2.92637 4.44439 2.92637Z" fill="#919191"/>
3
+ </svg>