ca-components 0.0.83 → 0.0.84
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/esm2022/lib/components/ca-input/directives/min-max-value.directive.mjs +9 -6
- package/esm2022/lib/components/ca-period-content/ca-period-content.component.mjs +8 -20
- package/esm2022/lib/components/ca-period-content/components/ca-period-content-payment/ca-period-content-payment.component.mjs +6 -3
- package/esm2022/lib/components/ca-period-content/components/ca-period-content-user-info/ca-period-content-user-info.component.mjs +5 -7
- package/esm2022/lib/components/ca-period-content/enums/payroll-type.enum.mjs +2 -2
- package/esm2022/lib/components/ca-period-content/models/payroll-report.type.mjs +1 -1
- package/esm2022/lib/components/ca-period-content/pipes/payroll-status-class.pipe.mjs +28 -0
- package/esm2022/lib/components/ca-period-content/pipes/period_status.pipe.mjs +12 -7
- package/esm2022/lib/components/ca-period-content/utils/helpers/payroll-period-content.helper.mjs +2 -120
- package/esm2022/lib/components/ca-todo/ca-todo.component.mjs +25 -16
- package/esm2022/lib/components/ca-todo/components/ca-todo-card.component.mjs +45 -11
- package/esm2022/lib/components/ca-todo/enums/download-link.enum.mjs +7 -0
- package/esm2022/lib/components/ca-todo/enums/index.mjs +2 -1
- package/esm2022/lib/components/ca-todo/models/todo-config.model.mjs +1 -1
- package/esm2022/lib/components/ca-todo/services/file-service.mjs +20 -0
- package/esm2022/lib/components/ca-todo/services/index.mjs +2 -0
- package/fesm2022/ca-components.mjs +147 -186
- package/fesm2022/ca-components.mjs.map +1 -1
- package/lib/components/ca-input/directives/min-max-value.directive.d.ts +3 -1
- package/lib/components/ca-period-content/ca-period-content.component.d.ts +0 -6
- package/lib/components/ca-period-content/components/ca-period-content-payment/ca-period-content-payment.component.d.ts +2 -1
- package/lib/components/ca-period-content/components/ca-period-content-user-info/ca-period-content-user-info.component.d.ts +1 -3
- package/lib/components/ca-period-content/enums/payroll-type.enum.d.ts +1 -1
- package/lib/components/ca-period-content/models/payroll-report.type.d.ts +6 -0
- package/lib/components/ca-period-content/pipes/payroll-status-class.pipe.d.ts +8 -0
- package/lib/components/ca-period-content/pipes/period_status.pipe.d.ts +2 -4
- package/lib/components/ca-period-content/utils/helpers/payroll-period-content.helper.d.ts +0 -25
- package/lib/components/ca-todo/ca-todo.component.d.ts +8 -4
- package/lib/components/ca-todo/components/ca-todo-card.component.d.ts +9 -3
- package/lib/components/ca-todo/enums/download-link.enum.d.ts +5 -0
- package/lib/components/ca-todo/enums/index.d.ts +1 -0
- package/lib/components/ca-todo/models/todo-config.model.d.ts +11 -11
- package/lib/components/ca-todo/services/file-service.d.ts +10 -0
- package/lib/components/ca-todo/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ThousandSeparatorPipe } from '../../../pipes/thousand-separator.pipe';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class MinMaxValueDirective {
|
|
4
5
|
private el;
|
|
6
|
+
private thousandSeparatorPipe;
|
|
5
7
|
minValue: number;
|
|
6
8
|
maxValue: number;
|
|
7
|
-
constructor(el: ElementRef);
|
|
9
|
+
constructor(el: ElementRef, thousandSeparatorPipe: ThousandSeparatorPipe);
|
|
8
10
|
onKeyPress(event: KeyboardEvent): void;
|
|
9
11
|
onPaste(event: ClipboardEvent): void;
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<MinMaxValueDirective, never>;
|
|
@@ -16,7 +16,6 @@ export declare class CaPeriodContentComponent {
|
|
|
16
16
|
salary: number;
|
|
17
17
|
totalEarnings: number;
|
|
18
18
|
debt: number;
|
|
19
|
-
private paymentSums;
|
|
20
19
|
debtTitle: string;
|
|
21
20
|
isInDebt?: boolean;
|
|
22
21
|
paymentStatus: string;
|
|
@@ -24,11 +23,6 @@ export declare class CaPeriodContentComponent {
|
|
|
24
23
|
extraPayments: ExtraPayments;
|
|
25
24
|
ngOnInit(): void;
|
|
26
25
|
constructor();
|
|
27
|
-
getAllPaymentSums(event: {
|
|
28
|
-
sum: number;
|
|
29
|
-
type: string;
|
|
30
|
-
}): void;
|
|
31
|
-
private setDebtTitle;
|
|
32
26
|
processPayment(): void;
|
|
33
27
|
addPayment(): void;
|
|
34
28
|
getReorderedData(data: {
|
|
@@ -12,6 +12,7 @@ export declare class CaPeriodContentPaymentComponent implements OnInit {
|
|
|
12
12
|
set excluded(excluded: PayrollReportTableResponse[] | undefined);
|
|
13
13
|
isOpen: boolean;
|
|
14
14
|
title: string;
|
|
15
|
+
hideTotal: boolean;
|
|
15
16
|
reorderedDataEmiter: EventEmitter<{
|
|
16
17
|
_included: PayrollReportTableResponse[];
|
|
17
18
|
_title: string;
|
|
@@ -38,5 +39,5 @@ export declare class CaPeriodContentPaymentComponent implements OnInit {
|
|
|
38
39
|
getSvgPath(propertyName: keyof typeof PeriodContentSvgRoutes): string;
|
|
39
40
|
identity(index: number): number;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<CaPeriodContentPaymentComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentPaymentComponent, "app-ca-period-content-payment", never, { "included": { "alias": "included"; "required": false; }; "excluded": { "alias": "excluded"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "reorderedDataEmiter": "reorderedDataEmiter"; }, never, never, true, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentPaymentComponent, "app-ca-period-content-payment", never, { "included": { "alias": "included"; "required": false; }; "excluded": { "alias": "excluded"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "title": { "alias": "title"; "required": false; }; "hideTotal": { "alias": "hideTotal"; "required": false; }; }, { "reorderedDataEmiter": "reorderedDataEmiter"; }, never, never, true, never>;
|
|
42
43
|
}
|
|
@@ -5,11 +5,9 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class CaPeriodContentUserInfoComponent {
|
|
6
6
|
componentData: PayrollReport;
|
|
7
7
|
type: PayrollTypeEnum;
|
|
8
|
-
paymentStatus: string;
|
|
9
8
|
isOpen: boolean;
|
|
10
|
-
status: number;
|
|
11
9
|
currentIcon: string;
|
|
12
10
|
getSvgPath(propertyName: keyof typeof PeriodContentSvgRoutes): string;
|
|
13
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<CaPeriodContentUserInfoComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentUserInfoComponent, "app-ca-period-content-user-info", never, { "componentData": { "alias": "componentData"; "required": false; }; "type": { "alias": "type"; "required": false; }; "
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CaPeriodContentUserInfoComponent, "app-ca-period-content-user-info", never, { "componentData": { "alias": "componentData"; "required": false; }; "type": { "alias": "type"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
13
|
}
|
|
@@ -5,7 +5,7 @@ export declare enum PayrollTypeEnum {
|
|
|
5
5
|
OWNER_COMMISSION = "OWNER_COMMISSION"
|
|
6
6
|
}
|
|
7
7
|
export declare enum userInfoEnum {
|
|
8
|
-
SHORT_PAID = "SHORT
|
|
8
|
+
SHORT_PAID = "SHORT PAID",
|
|
9
9
|
CLOSED_UNPAID = "CLOSED UNPAID",
|
|
10
10
|
PAID_IN_FULL = "PAID IN FULL",
|
|
11
11
|
READY_IN_DAYS = "READY IN 444 DAYS",
|
|
@@ -37,4 +37,10 @@ export interface PayrollReport {
|
|
|
37
37
|
excludedLoads?: Array<PayrollLoadMinimalResponse> | null;
|
|
38
38
|
mapLocations?: Array<any> | null;
|
|
39
39
|
sums?: any | null;
|
|
40
|
+
payments?: Array<PayrollReportTableResponse> | null;
|
|
41
|
+
status: {
|
|
42
|
+
name: string;
|
|
43
|
+
id: number;
|
|
44
|
+
};
|
|
45
|
+
debt: number;
|
|
40
46
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { PayrollReport } from '../models/payroll-report.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class PayrollStatusClassPipe implements PipeTransform {
|
|
5
|
+
transform(isOpen: boolean, payroll: PayrollReport): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PayrollStatusClassPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PayrollStatusClassPipe, "payrollStatusClass", true>;
|
|
8
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { PayrollReport } from '../models/payroll-report.type';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class PeriodStatusPipe implements PipeTransform {
|
|
4
|
-
transform(
|
|
5
|
-
numberOfDays: number;
|
|
6
|
-
period: string;
|
|
7
|
-
}): {
|
|
5
|
+
transform(isOpen: boolean, payroll: PayrollReport): {
|
|
8
6
|
title: string;
|
|
9
7
|
url: string;
|
|
10
8
|
};
|
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import { ComponentData, DriverInfo, ExtraPayments, PayrollBonusResponse, PayrollCreditResponse, PayrollDeductionResponse, PayrollFuelMinimalResponse, PayrollPeriodDriverResponse } from '../../models';
|
|
2
|
-
import { PayrollTypeEnum } from '../../enums';
|
|
3
1
|
import { PeriodContentSvgRoutes } from '../svg-routes';
|
|
4
2
|
export declare class PayrollPeriodContentHelper {
|
|
5
|
-
static getSalary(componentData: ComponentData): number;
|
|
6
|
-
static calculateTotalEarnings(componentData: ComponentData, paymentSums: {
|
|
7
|
-
sum: number;
|
|
8
|
-
type: string;
|
|
9
|
-
}[]): {
|
|
10
|
-
totalEarnings: number;
|
|
11
|
-
debt: number;
|
|
12
|
-
salary: number;
|
|
13
|
-
};
|
|
14
|
-
static sumSubtotals(items: (PayrollBonusResponse | PayrollDeductionResponse | PayrollCreditResponse | PayrollFuelMinimalResponse)[]): number;
|
|
15
|
-
static setDebtTitle(debt: number, totalEarnings: number): {
|
|
16
|
-
debtTitle: string;
|
|
17
|
-
isInDebt: boolean;
|
|
18
|
-
paymentStatus: string;
|
|
19
|
-
};
|
|
20
|
-
static calculateDriverAndPaymentInfo(componentData: PayrollPeriodDriverResponse, type: PayrollTypeEnum): {
|
|
21
|
-
driverInfo: DriverInfo;
|
|
22
|
-
extraPayments: ExtraPayments;
|
|
23
|
-
};
|
|
24
|
-
private static extractDriverInfo;
|
|
25
|
-
private static extractExtraPayments;
|
|
26
|
-
private static extractOwnerCommissionInfo;
|
|
27
|
-
private static extractDriverOrOwnerInfo;
|
|
28
3
|
static getIcon(status: {
|
|
29
4
|
numberOfDays: number;
|
|
30
5
|
period: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { DropResult } from 'ngx-smooth-dnd';
|
|
3
2
|
import { ToDoConfig } from './models';
|
|
3
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class CaTodoComponent {
|
|
6
6
|
private cdr;
|
|
@@ -15,10 +15,14 @@ export declare class CaTodoComponent {
|
|
|
15
15
|
constructor(cdr: ChangeDetectorRef);
|
|
16
16
|
ngOnInit(): void;
|
|
17
17
|
initializeColumn(): void;
|
|
18
|
-
onDrop(
|
|
19
|
-
getCardPayload(columnId: string): (index: number) => ToDoConfig | undefined;
|
|
18
|
+
onDrop(event: CdkDragDrop<any[]>): void;
|
|
20
19
|
updateTodoStates(): void;
|
|
21
|
-
trackById(index: number, item:
|
|
20
|
+
trackById(index: number, item: {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
config: ToDoConfig[];
|
|
24
|
+
}): string;
|
|
25
|
+
trackBy(index: number): number;
|
|
22
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<CaTodoComponent, never>;
|
|
23
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<CaTodoComponent, "app-ca-todo", never, { "todoConfig": { "alias": "todoConfig"; "required": false; }; "inProgressConfig": { "alias": "inProgressConfig"; "required": false; }; "completedConfig": { "alias": "completedConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { EventEmitter, Renderer2 } from '@angular/core';
|
|
2
2
|
import { ToDoCardConfig } from '../models';
|
|
3
3
|
import { IItemList } from '../../../models/dropdown.model';
|
|
4
4
|
import { ProgressExpiration } from '../../ca-progress-expiration/models';
|
|
@@ -9,8 +9,11 @@ import { FileConfig, FileEvent } from '../../ca-upload-files/components/ca-uploa
|
|
|
9
9
|
import { TodoSvgRoute } from '../utils';
|
|
10
10
|
import { CaUploadFilesCarouselComponent } from '../../ca-upload-files/components/ca-upload-files-carousel/ca-upload-files-carousel.component';
|
|
11
11
|
import { DropzoneConf } from '../../ca-upload-files/components/ca-upload-dropzone/config';
|
|
12
|
+
import { FileService } from '../services';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
export declare class CaTodoCardComponent {
|
|
15
|
+
private fileService;
|
|
16
|
+
private renderer;
|
|
14
17
|
modalCarousel: CaUploadFilesCarouselComponent;
|
|
15
18
|
config: ToDoCardConfig;
|
|
16
19
|
commentConfig: CommentConfig[];
|
|
@@ -27,6 +30,7 @@ export declare class CaTodoCardComponent {
|
|
|
27
30
|
configDropzone: DropzoneConf;
|
|
28
31
|
onFileEvent: EventEmitter<FileEvent>;
|
|
29
32
|
svgTodo: typeof TodoSvgRoute;
|
|
33
|
+
private unsubscribe$;
|
|
30
34
|
isDropdownShown: boolean;
|
|
31
35
|
link: string;
|
|
32
36
|
isLinkVisible: boolean;
|
|
@@ -39,7 +43,9 @@ export declare class CaTodoCardComponent {
|
|
|
39
43
|
isNewComment: boolean;
|
|
40
44
|
_files: FileConfig[];
|
|
41
45
|
_config: FileOptionConfig;
|
|
46
|
+
constructor(fileService: FileService, renderer: Renderer2);
|
|
42
47
|
ngOnInit(): void;
|
|
48
|
+
ngOnDestroy(): void;
|
|
43
49
|
onDropdownItemClick(item: IItemList): void;
|
|
44
50
|
addLink(): void;
|
|
45
51
|
toggleComments(): void;
|
|
@@ -48,9 +54,9 @@ export declare class CaTodoCardComponent {
|
|
|
48
54
|
toggleNewComment(): void;
|
|
49
55
|
getCommentCounter(): void;
|
|
50
56
|
getDocumentCounter(): void;
|
|
51
|
-
identity(index: number): number;
|
|
52
|
-
onFilesChanged(test: any): void;
|
|
53
57
|
saveAllFiles(): void;
|
|
58
|
+
downloadFile(url: string, filename: string): void;
|
|
59
|
+
identity(index: number): number;
|
|
54
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<CaTodoCardComponent, never>;
|
|
55
61
|
static ɵcmp: i0.ɵɵComponentDeclaration<CaTodoCardComponent, "app-ca-todo-card", never, { "config": { "alias": "config"; "required": false; }; "commentConfig": { "alias": "commentConfig"; "required": false; }; "newCommentConfig": { "alias": "newCommentConfig"; "required": false; }; "itemList": { "alias": "itemList"; "required": false; }; "configProgress": { "alias": "configProgress"; "required": false; }; "isVisibleCropAndDrop": { "alias": "isVisibleCropAndDrop"; "required": false; }; "hasCrop": { "alias": "hasCrop"; "required": false; }; "slider": { "alias": "slider"; "required": false; }; "carouselConfig": { "alias": "carouselConfig"; "required": false; }; "review": { "alias": "review"; "required": false; }; "configFile": { "alias": "configFile"; "required": false; }; "files": { "alias": "files"; "required": false; }; "configDropzone": { "alias": "configDropzone"; "required": false; }; }, { "onFileEvent": "onFileEvent"; }, never, never, true, never>;
|
|
56
62
|
}
|
|
@@ -8,16 +8,16 @@ import { FileOptionConfig, ReviewFileConfig } from '../../ca-upload-files/models
|
|
|
8
8
|
import { FileConfig } from '../../ca-upload-files/components/ca-upload-dropzone/models';
|
|
9
9
|
export interface ToDoConfig {
|
|
10
10
|
id: number;
|
|
11
|
-
config
|
|
12
|
-
commentConfig
|
|
13
|
-
newCommentConfig
|
|
14
|
-
itemList
|
|
11
|
+
config: ToDoCardConfig;
|
|
12
|
+
commentConfig: CommentConfig[];
|
|
13
|
+
newCommentConfig: CommentConfig[];
|
|
14
|
+
itemList: IItemList[];
|
|
15
15
|
configProgress?: ProgressExpiration[];
|
|
16
|
-
isVisibleCropAndDrop
|
|
17
|
-
hasCrop
|
|
18
|
-
slider
|
|
19
|
-
carouselConfig
|
|
20
|
-
review
|
|
21
|
-
configFile
|
|
22
|
-
files
|
|
16
|
+
isVisibleCropAndDrop: boolean;
|
|
17
|
+
hasCrop: boolean;
|
|
18
|
+
slider: Slider;
|
|
19
|
+
carouselConfig: FilesCarouselConfig;
|
|
20
|
+
review: ReviewFileConfig;
|
|
21
|
+
configFile: FileOptionConfig;
|
|
22
|
+
files: FileConfig[];
|
|
23
23
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FileService {
|
|
5
|
+
private http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
downloadFile(url: string): Observable<Blob>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FileService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './file-service';
|