@cbm-common/cbm-types 0.0.31 → 0.0.33
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/lib/components/availability-board/availability-board.d.ts +25 -0
- package/lib/components/availability-board/availability-board.model.d.ts +46 -0
- package/lib/components/availability-board/directives/drop-menu.directive.d.ts +19 -0
- package/lib/components/availability-board/models/value-column.model.d.ts +6 -0
- package/lib/components/availability-board/services/config.service.d.ts +7 -0
- package/lib/components/availability-board/services/mouse-position.service.d.ts +14 -0
- package/lib/domain/models/company-custom.domain.model.d.ts +52 -0
- package/lib/domain/repositories/company-custom.domain.repository.d.ts +11 -0
- package/lib/infrastructure/repositories/company-custom.infrastructure.repository.d.ts +8 -0
- package/lib/infrastructure/services/company-custom.infrastructure.service.d.ts +12 -0
- package/lib/remotes/components.remote.d.ts +1 -0
- package/lib/remotes/repositories/company-custom.repository.d.ts +3 -0
- package/lib/remotes/repositories.remote.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +7 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AvailabilityBoardModel } from './availability-board.model';
|
|
2
|
+
import { ValueColumnCompModel } from './models/value-column.model';
|
|
3
|
+
import { ConfigService } from './services/config.service';
|
|
4
|
+
export declare class CbmAvailabilityBoardComponent {
|
|
5
|
+
private readonly configService;
|
|
6
|
+
constructor(configService: ConfigService);
|
|
7
|
+
timelineRange: import("@angular/core").WritableSignal<Date[]>;
|
|
8
|
+
protected timeline: import("@angular/core").WritableSignal<AvailabilityBoardModel.DateRange[]>;
|
|
9
|
+
protected titleBody: import("@angular/core").WritableSignal<ValueColumnCompModel.Values[]>;
|
|
10
|
+
'title-column': import("@angular/core").InputSignal<string>;
|
|
11
|
+
'loading-state': import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
'menu-delay': import("@angular/core").InputSignal<number>;
|
|
13
|
+
'menu-offsetX': import("@angular/core").InputSignal<number>;
|
|
14
|
+
'menu-offsetY': import("@angular/core").InputSignal<number>;
|
|
15
|
+
protected titleColumn: import("@angular/core").Signal<string>;
|
|
16
|
+
protected loadingState: import("@angular/core").Signal<boolean>;
|
|
17
|
+
protected totalColumns: import("@angular/core").Signal<number>;
|
|
18
|
+
protected setGridColumns: (repeat: number, maxFirst?: string) => string;
|
|
19
|
+
protected setGridRows: (repeat: number) => string;
|
|
20
|
+
protected setSpan: (span: number) => string;
|
|
21
|
+
setValuesColumn(value: AvailabilityBoardModel.ValueColumn[]): void;
|
|
22
|
+
setEvents<T = any>(events: AvailabilityBoardModel.EventParams[], bgColor?: (d: Date, data: T) => string): void;
|
|
23
|
+
isToday(date: Date): boolean;
|
|
24
|
+
isEqualDate(date1: Date, date2: Date): boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare namespace AvailabilityBoardModel {
|
|
2
|
+
interface ValueColumn {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface DateRange {
|
|
7
|
+
id: string;
|
|
8
|
+
month: number;
|
|
9
|
+
month_name: string;
|
|
10
|
+
days: DateRange.Days[];
|
|
11
|
+
}
|
|
12
|
+
namespace DateRange {
|
|
13
|
+
interface Days {
|
|
14
|
+
id: string;
|
|
15
|
+
date: Date;
|
|
16
|
+
day: number;
|
|
17
|
+
day_name: string;
|
|
18
|
+
event: {
|
|
19
|
+
[k: string]: EventData | undefined;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
interface EventParams extends Omit<EventData, 'duration_in_days' | 'bg_color'> {
|
|
24
|
+
}
|
|
25
|
+
interface EventData<T = any> {
|
|
26
|
+
value_id: string;
|
|
27
|
+
start_date: Date;
|
|
28
|
+
end_date: Date;
|
|
29
|
+
label: string;
|
|
30
|
+
description: EventDescription[];
|
|
31
|
+
duration_in_days: number;
|
|
32
|
+
data?: T;
|
|
33
|
+
bg_color?: string;
|
|
34
|
+
options: EventOptions<T>[];
|
|
35
|
+
}
|
|
36
|
+
interface EventOptions<T = any> {
|
|
37
|
+
label: string;
|
|
38
|
+
function: (data: T) => void;
|
|
39
|
+
}
|
|
40
|
+
interface EventDescription {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export declare const monthsEs: string[];
|
|
46
|
+
export declare const daysEs: string[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
+
import { MousePositionService } from '../services/mouse-position.service';
|
|
3
|
+
export declare class CbmDropMenu implements AfterViewInit {
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
private readonly mousePosService;
|
|
6
|
+
constructor(elementRef: ElementRef<HTMLElement>, mousePosService: MousePositionService);
|
|
7
|
+
delay: import("@angular/core").InputSignal<number>;
|
|
8
|
+
offsetX: import("@angular/core").InputSignal<number>;
|
|
9
|
+
offsetY: import("@angular/core").InputSignal<number>;
|
|
10
|
+
private timeoutId?;
|
|
11
|
+
private menuRef?;
|
|
12
|
+
private clientX;
|
|
13
|
+
private clientY;
|
|
14
|
+
private mouseSub?;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
onEnter(): Promise<void>;
|
|
18
|
+
onLeave(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AvailabilityBoardModel } from '../availability-board.model';
|
|
2
|
+
export declare class ConfigService {
|
|
3
|
+
timeline: import("@angular/core").WritableSignal<AvailabilityBoardModel.DateRange[]>;
|
|
4
|
+
private readonly monthsEs;
|
|
5
|
+
private readonly daysEs;
|
|
6
|
+
setTimelineRange(start: Date, end: Date): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
export declare class MousePositionService {
|
|
3
|
+
private ngZone;
|
|
4
|
+
private mousePosition$;
|
|
5
|
+
constructor(ngZone: NgZone);
|
|
6
|
+
getPositionObservable(): import("rxjs").Observable<{
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}>;
|
|
10
|
+
getCurrentPosition(): {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare namespace CbmCompanyCustomModel {
|
|
2
|
+
interface FindResponse {
|
|
3
|
+
_id: string;
|
|
4
|
+
company_id: string;
|
|
5
|
+
group_accounting_account: boolean;
|
|
6
|
+
item_sales: boolean;
|
|
7
|
+
kit_sales: boolean;
|
|
8
|
+
service_sales: boolean;
|
|
9
|
+
update_at: number;
|
|
10
|
+
updated_user: string;
|
|
11
|
+
cost_center_level: number;
|
|
12
|
+
outsourcing_service_sales: boolean;
|
|
13
|
+
account_level: number;
|
|
14
|
+
custom_client_level: number;
|
|
15
|
+
custom_provider_level: number;
|
|
16
|
+
category_item_level: number;
|
|
17
|
+
service_group_level: number;
|
|
18
|
+
}
|
|
19
|
+
interface UpdateBody {
|
|
20
|
+
item_sales?: boolean;
|
|
21
|
+
kit_sales?: boolean;
|
|
22
|
+
service_sales?: boolean;
|
|
23
|
+
outsourcing_service_sales?: boolean;
|
|
24
|
+
group_accounting_account?: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface FindCustomLevelsResponse {
|
|
27
|
+
success: boolean;
|
|
28
|
+
data: FindCustomLevelsResponse.Data[];
|
|
29
|
+
}
|
|
30
|
+
namespace FindCustomLevelsResponse {
|
|
31
|
+
interface Data {
|
|
32
|
+
_id: string;
|
|
33
|
+
company_id: string;
|
|
34
|
+
description: string;
|
|
35
|
+
value: number;
|
|
36
|
+
event_module: string;
|
|
37
|
+
created_user: string;
|
|
38
|
+
created_at: number;
|
|
39
|
+
updated_at?: number;
|
|
40
|
+
updated_user?: string;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
interface UpdateCustomLevelBody {
|
|
44
|
+
value?: number;
|
|
45
|
+
event_module?: string;
|
|
46
|
+
}
|
|
47
|
+
interface ConfirmResponse {
|
|
48
|
+
success: boolean;
|
|
49
|
+
message: string;
|
|
50
|
+
data?: any;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ICbmCompanyCustomRepository } from "../../infrastructure/repositories/company-custom.infrastructure.repository";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { CbmCompanyCustomModel } from "../models/company-custom.domain.model";
|
|
4
|
+
export declare class CbmCompanyCustomRepository implements ICbmCompanyCustomRepository {
|
|
5
|
+
private service;
|
|
6
|
+
constructor(service: ICbmCompanyCustomRepository);
|
|
7
|
+
getLevels(): Observable<CbmCompanyCustomModel.FindResponse>;
|
|
8
|
+
getCustomLevels(): Observable<CbmCompanyCustomModel.FindCustomLevelsResponse>;
|
|
9
|
+
updateCustomLevel(id: string, data: CbmCompanyCustomModel.UpdateCustomLevelBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
10
|
+
update(id: string, data: CbmCompanyCustomModel.UpdateBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CbmCompanyCustomModel } from "../../domain/models/company-custom.domain.model";
|
|
3
|
+
export interface ICbmCompanyCustomRepository {
|
|
4
|
+
getLevels(): Observable<CbmCompanyCustomModel.FindResponse>;
|
|
5
|
+
getCustomLevels(): Observable<CbmCompanyCustomModel.FindCustomLevelsResponse>;
|
|
6
|
+
updateCustomLevel(id: string, data: CbmCompanyCustomModel.UpdateCustomLevelBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
7
|
+
update(id: string, data: CbmCompanyCustomModel.UpdateBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { CbmCompanyCustomModel } from "../../domain/models/company-custom.domain.model";
|
|
4
|
+
export declare class CbmCompanyCustomService {
|
|
5
|
+
private http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
private readonly url;
|
|
8
|
+
getLevels(): Observable<CbmCompanyCustomModel.FindResponse>;
|
|
9
|
+
getCustomLevels(): Observable<CbmCompanyCustomModel.FindCustomLevelsResponse>;
|
|
10
|
+
updateCustomLevel(id: string, data: CbmCompanyCustomModel.UpdateCustomLevelBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
11
|
+
update(id: string, data: CbmCompanyCustomModel.UpdateBody): Observable<CbmCompanyCustomModel.ConfirmResponse>;
|
|
12
|
+
}
|
|
@@ -14,3 +14,4 @@ export { CbmTreeSelectComponent } from '../components/tree-select/tree-select';
|
|
|
14
14
|
export { CbmViewReportComponent } from '../components/view-reports/view-reports';
|
|
15
15
|
export { ConfirmationModal } from '../components/confirmation-modal/confirmation-modal';
|
|
16
16
|
export { StockByWarehouse } from '../components/stock-by-warehouse/stock-by-warehouse';
|
|
17
|
+
export { CbmAvailabilityBoardComponent } from '../components/availability-board/availability-board';
|
|
@@ -43,3 +43,4 @@ export * from './repositories/sri-history.repository';
|
|
|
43
43
|
export * from './repositories/stock-item.repository';
|
|
44
44
|
export * from './repositories/upload.repository';
|
|
45
45
|
export * from './repositories/warehouse.repository';
|
|
46
|
+
export * from './repositories/company-branch.repository';
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -215,7 +215,6 @@ export * from './lib/domain/models/billing.domain.model';
|
|
|
215
215
|
export * from './lib/domain/repositories/billing-order.domain.repository';
|
|
216
216
|
export * from './lib/domain/models/billing-order.domain.model';
|
|
217
217
|
|
|
218
|
-
|
|
219
218
|
// #region country code repository
|
|
220
219
|
export * from './lib/domain/repositories/country-code.domain.repository';
|
|
221
220
|
export * from './lib/domain/models/country-code.domain.model';
|
|
@@ -246,6 +245,13 @@ export * from './lib/components/stock-by-warehouse/type';
|
|
|
246
245
|
export * from './lib/domain/repositories/company-branch.domain.repository';
|
|
247
246
|
export * from './lib/domain/models/company-branch.domain.model';
|
|
248
247
|
|
|
248
|
+
// #region company custom repository
|
|
249
|
+
export * from './lib/domain/repositories/company-custom.domain.repository';
|
|
250
|
+
export * from './lib/domain/models/company-custom.domain.model';
|
|
251
|
+
|
|
249
252
|
// #region stock item repository
|
|
250
253
|
export * from './lib/domain/repositories/stock-item.domain.repository';
|
|
251
254
|
export * from './lib/domain/models/stock-item.domain.model';
|
|
255
|
+
|
|
256
|
+
// #region available board component
|
|
257
|
+
export * from './lib/components/available-board/available-board';
|