@hitsoft/kadooglu.kalite 0.0.0-stage → 1.0.1

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 (62) hide show
  1. package/README.md +23 -2
  2. package/config/enums/index.d.ts +1 -0
  3. package/config/enums/route-names.d.ts +5 -0
  4. package/config/index.d.ts +5 -0
  5. package/config/kalite-config.module.d.ts +8 -0
  6. package/config/providers/index.d.ts +1 -0
  7. package/config/providers/route.provider.d.ts +4 -0
  8. package/config/public-api.d.ts +3 -0
  9. package/esm2020/config/enums/index.mjs +2 -0
  10. package/esm2020/config/enums/route-names.mjs +2 -0
  11. package/esm2020/config/hitsoft-kadooglu.kalite-config.mjs +5 -0
  12. package/esm2020/config/kalite-config.module.mjs +18 -0
  13. package/esm2020/config/providers/index.mjs +2 -0
  14. package/esm2020/config/providers/route.provider.mjs +57 -0
  15. package/esm2020/config/public-api.mjs +4 -0
  16. package/esm2020/hitsoft-kadooglu.kalite.mjs +5 -0
  17. package/esm2020/lib/components/intake-form.component.mjs +162 -0
  18. package/esm2020/lib/components/intake-list.component.mjs +80 -0
  19. package/esm2020/lib/components/kalite.component.mjs +18 -0
  20. package/esm2020/lib/components/process-analysis.component.mjs +197 -0
  21. package/esm2020/lib/components/quality-definitions.component.mjs +97 -0
  22. package/esm2020/lib/components/quality-notifications.component.mjs +64 -0
  23. package/esm2020/lib/components/quality-parameters.component.mjs +332 -0
  24. package/esm2020/lib/components/quality-reports.component.mjs +107 -0
  25. package/esm2020/lib/kalite-notification.module.mjs +23 -0
  26. package/esm2020/lib/kalite-routing.module.mjs +41 -0
  27. package/esm2020/lib/kalite.module.mjs +41 -0
  28. package/esm2020/lib/models/intake.models.mjs +2 -0
  29. package/esm2020/lib/models/quality.models.mjs +2 -0
  30. package/esm2020/lib/services/kalite.service.mjs +21 -0
  31. package/esm2020/lib/services/print-form.mjs +96 -0
  32. package/esm2020/lib/services/quality-api.service.mjs +119 -0
  33. package/esm2020/lib/services/quality-measurements.mjs +127 -0
  34. package/esm2020/public-api.mjs +16 -0
  35. package/fesm2015/hitsoft-kadooglu.kalite-config.mjs +80 -0
  36. package/fesm2015/hitsoft-kadooglu.kalite-config.mjs.map +1 -0
  37. package/fesm2015/hitsoft-kadooglu.kalite.mjs +1483 -0
  38. package/fesm2015/hitsoft-kadooglu.kalite.mjs.map +1 -0
  39. package/fesm2020/hitsoft-kadooglu.kalite-config.mjs +80 -0
  40. package/fesm2020/hitsoft-kadooglu.kalite-config.mjs.map +1 -0
  41. package/fesm2020/hitsoft-kadooglu.kalite.mjs +1442 -0
  42. package/fesm2020/hitsoft-kadooglu.kalite.mjs.map +1 -0
  43. package/index.d.ts +5 -0
  44. package/lib/components/intake-form.component.d.ts +50 -0
  45. package/lib/components/intake-list.component.d.ts +48 -0
  46. package/lib/components/kalite.component.d.ts +10 -0
  47. package/lib/components/process-analysis.component.d.ts +46 -0
  48. package/lib/components/quality-definitions.component.d.ts +46 -0
  49. package/lib/components/quality-notifications.component.d.ts +44 -0
  50. package/lib/components/quality-parameters.component.d.ts +82 -0
  51. package/lib/components/quality-reports.component.d.ts +31 -0
  52. package/lib/kalite-notification.module.d.ts +14 -0
  53. package/lib/kalite-routing.module.d.ts +7 -0
  54. package/lib/kalite.module.d.ts +23 -0
  55. package/lib/models/intake.models.d.ts +185 -0
  56. package/lib/models/quality.models.d.ts +114 -0
  57. package/lib/services/kalite.service.d.ts +10 -0
  58. package/lib/services/print-form.d.ts +2 -0
  59. package/lib/services/quality-api.service.d.ts +71 -0
  60. package/lib/services/quality-measurements.d.ts +8 -0
  61. package/package.json +42 -3
  62. package/public-api.d.ts +12 -0
@@ -0,0 +1,114 @@
1
+ export interface QualityForm {
2
+ controlType?: 'Input' | 'Process';
3
+ movementDetailCode?: string;
4
+ averageMode?: 'Weighted' | 'Arithmetic';
5
+ quantityUnit?: 'kg' | 't';
6
+ code: string;
7
+ name: string;
8
+ documentCode: string;
9
+ publicationDate: string;
10
+ revisionDate: string;
11
+ revisionNumber: string;
12
+ active: boolean;
13
+ }
14
+ export interface QualityFacility {
15
+ code: string;
16
+ name: string;
17
+ formCode: string;
18
+ active: boolean;
19
+ }
20
+ export interface QualityStep {
21
+ code: string;
22
+ facilityCode: string;
23
+ processCode: string;
24
+ name: string;
25
+ order: number;
26
+ active: boolean;
27
+ }
28
+ export interface QualityParameter {
29
+ code: string;
30
+ formCode: string;
31
+ stepCode: string;
32
+ order: number;
33
+ name: string;
34
+ unit: string;
35
+ valueType: 'Number' | 'Text' | 'Choice';
36
+ decimalPlaces: number;
37
+ required: boolean;
38
+ calculated: boolean;
39
+ formula: string;
40
+ options: string[];
41
+ active: boolean;
42
+ }
43
+ export interface QualityLimit {
44
+ origin?: string;
45
+ code: string;
46
+ parameterCode: string;
47
+ oilType: string;
48
+ minimum: number | null;
49
+ maximum: number | null;
50
+ nominal: number | null;
51
+ expectedText: string;
52
+ validFrom: string | null;
53
+ validUntil: string | null;
54
+ active: boolean;
55
+ }
56
+ export interface QualityTemplate {
57
+ form: QualityForm;
58
+ steps: QualityStep[];
59
+ parameters: QualityParameter[];
60
+ limits: QualityLimit[];
61
+ }
62
+ export interface QualityMeasurement {
63
+ parameterCode: string;
64
+ parameterName?: string;
65
+ unit?: string;
66
+ number: number | null;
67
+ text: string;
68
+ appliedMinimum?: number | null;
69
+ appliedMaximum?: number | null;
70
+ appliedNominal?: number | null;
71
+ appliedExpectedText?: string;
72
+ outOfLimit?: boolean;
73
+ }
74
+ export interface QualityHour {
75
+ shiftCode?: string;
76
+ analyst?: string;
77
+ analystUserId?: string | null;
78
+ hour: number;
79
+ intakeTank: string;
80
+ outputTank: string;
81
+ measurements: QualityMeasurement[];
82
+ }
83
+ export interface QualitySignature {
84
+ userId: string;
85
+ userName: string;
86
+ signedAt: string;
87
+ }
88
+ export interface QualityEvent {
89
+ code: string;
90
+ analysisCode: string;
91
+ action: string;
92
+ userId: string;
93
+ userName: string;
94
+ occurredAt: string;
95
+ reason: string;
96
+ }
97
+ export interface QualityAnalysis {
98
+ code: string;
99
+ facilityCode: string;
100
+ businessDate: string;
101
+ oilType: string;
102
+ status: 'Draft' | 'LaborantSigned' | 'Checked' | 'Approved';
103
+ notes: string;
104
+ outOfLimitReason: string;
105
+ formSnapshot: QualityForm;
106
+ templateSnapshot: QualityTemplate;
107
+ laborant: QualitySignature | null;
108
+ engineer: QualitySignature | null;
109
+ approver: QualitySignature | null;
110
+ revision: number;
111
+ isDeleted: boolean;
112
+ history: QualityEvent[];
113
+ hours: QualityHour[];
114
+ }
@@ -0,0 +1,10 @@
1
+ import { RestService } from '@abp/ng.core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class KaliteService {
4
+ private restService;
5
+ apiName: string;
6
+ constructor(restService: RestService);
7
+ sample(): import("rxjs").Observable<any>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<KaliteService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<KaliteService>;
10
+ }
@@ -0,0 +1,2 @@
1
+ /** Print only the form, with current control values and the application's existing colors. */
2
+ export declare function printForm(source: HTMLElement, title: string): Promise<void>;
@@ -0,0 +1,71 @@
1
+ import { RestService } from '@abp/ng.core';
2
+ import { Observable } from 'rxjs';
3
+ import { MovementType, MovementDetail, QualityTank, QualityShift, IntakeForm, IntakeInspection, CompositeSample, IntakeVehicle, Paged, ReportFilter, QualityReport, QualityNotification, NotificationSettings, QualityLaborant } from '../models/intake.models';
4
+ import { QualityAnalysis, QualityFacility, QualityForm, QualityLimit, QualityParameter, QualityStep, QualityTemplate } from '../models/quality.models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class QualityApiService {
7
+ private rest;
8
+ private readonly apiName;
9
+ constructor(rest: RestService);
10
+ movementTypes(): Observable<MovementType[]>;
11
+ qualityMovementTypes(): Observable<MovementType[]>;
12
+ reportForms(): Observable<QualityForm[]>;
13
+ definitionFacilities(): Observable<QualityFacility[]>;
14
+ movementDetails(): Observable<MovementDetail[]>;
15
+ tanks(): Observable<QualityTank[]>;
16
+ shifts(): Observable<QualityShift[]>;
17
+ laborants(): Observable<QualityLaborant[]>;
18
+ saveDetail(input: MovementDetail, createOnly?: boolean): Observable<void>;
19
+ deleteDetail(code: string): Observable<void>;
20
+ saveTank(input: QualityTank, createOnly?: boolean): Observable<void>;
21
+ deleteTank(code: string): Observable<void>;
22
+ saveShift(input: QualityShift): Observable<void>;
23
+ deleteShift(code: string): Observable<void>;
24
+ intakeList(query: Record<string, unknown>): Observable<Paged<IntakeVehicle>>;
25
+ intake(id: number, detailCode?: string, batchNumber?: string): Observable<IntakeForm>;
26
+ intakeTemplate(code: string): Observable<QualityTemplate>;
27
+ saveIntake(input: unknown): Observable<IntakeInspection>;
28
+ saveComposite(input: unknown): Observable<CompositeSample>;
29
+ cancelIntake(id: number, revision: number, reason: string): Observable<void>;
30
+ intakePdf(id: number): Observable<Blob>;
31
+ report(filter: ReportFilter, exportData?: boolean): Observable<QualityReport>;
32
+ reportPdf(filter: ReportFilter): Observable<Blob>;
33
+ notifications(): Observable<QualityNotification[]>;
34
+ unreadNotifications(): Observable<number>;
35
+ readNotification(code: string): Observable<void>;
36
+ notificationSettings(): Observable<NotificationSettings>;
37
+ notificationFailures(): Observable<QualityNotification[]>;
38
+ saveNotificationSettings(input: NotificationSettings): Observable<void>;
39
+ private query;
40
+ private blob;
41
+ forms(): Observable<QualityForm[]>;
42
+ template(code: string): Observable<QualityTemplate>;
43
+ parameterFacilities(): Observable<QualityFacility[]>;
44
+ steps(facilityCode: string): Observable<QualityStep[]>;
45
+ saveStep(step: QualityStep): Observable<void>;
46
+ saveForm(form: QualityForm): Observable<void>;
47
+ createParameter(parameter: QualityParameter): Observable<void>;
48
+ updateParameter(parameter: QualityParameter): Observable<void>;
49
+ deleteParameter(code: string): Observable<void>;
50
+ createLimit(limit: QualityLimit): Observable<void>;
51
+ updateLimit(limit: QualityLimit): Observable<void>;
52
+ deleteLimit(code: string): Observable<void>;
53
+ facilities(): Observable<QualityFacility[]>;
54
+ process(facilityCode: string, businessDate: string): Observable<QualityAnalysis>;
55
+ saveProcess(input: {
56
+ facilityCode: string;
57
+ businessDate: string;
58
+ oilType: string;
59
+ notes: string;
60
+ revision: number;
61
+ hours: QualityAnalysis['hours'];
62
+ }): Observable<QualityAnalysis>;
63
+ decision(code: string, action: 'sign' | 'check' | 'approve' | 'revoke', revision: number, reason: string): Observable<QualityAnalysis>;
64
+ pdf(code: string): Observable<Blob>;
65
+ private get;
66
+ private post;
67
+ private put;
68
+ private delete;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<QualityApiService, never>;
70
+ static ɵprov: i0.ɵɵInjectableDeclaration<QualityApiService>;
71
+ }
@@ -0,0 +1,8 @@
1
+ import { QualityLimit, QualityMeasurement, QualityParameter } from '../models/quality.models';
2
+ export declare function applicableLimit(limits: QualityLimit[], code: string, date: string, oilType?: string, origin?: string): QualityLimit | undefined;
3
+ export declare function evaluateFormula(formula: string, resolve: (code: string) => number | null): number | null;
4
+ export declare function recalculate(parameters: QualityParameter[], values: QualityMeasurement[], limits: QualityLimit[], date: string, oilType?: string, origin?: string): void;
5
+ export declare function download(blob: Blob, name: string): void;
6
+ export declare function localDate(date?: Date): string;
7
+ export declare function errorMessage(error: any): string;
8
+ export declare function statusLabel(status: string): string;
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@hitsoft/kadooglu.kalite",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@ng-bootstrap/ng-bootstrap": "^13.0.0",
6
+ "@angular/common": ">=9",
7
+ "@angular/core": ">=9",
8
+ "@abp/ng.core": ">=6.0.2",
9
+ "@abp/ng.theme.shared": ">=6.0.2",
10
+ "exceljs": "^4.2.0",
11
+ "devextreme": "^22.1.4",
12
+ "devextreme-angular": "^22.1.4"
13
+ },
14
+ "dependencies": {
15
+ "tslib": "^2.1.0"
16
+ },
17
+ "module": "fesm2015/hitsoft-kadooglu.kalite.mjs",
18
+ "es2020": "fesm2020/hitsoft-kadooglu.kalite.mjs",
19
+ "esm2020": "esm2020/hitsoft-kadooglu.kalite.mjs",
20
+ "fesm2020": "fesm2020/hitsoft-kadooglu.kalite.mjs",
21
+ "fesm2015": "fesm2015/hitsoft-kadooglu.kalite.mjs",
22
+ "typings": "index.d.ts",
23
+ "exports": {
24
+ "./package.json": {
25
+ "default": "./package.json"
26
+ },
27
+ ".": {
28
+ "types": "./index.d.ts",
29
+ "esm2020": "./esm2020/hitsoft-kadooglu.kalite.mjs",
30
+ "es2020": "./fesm2020/hitsoft-kadooglu.kalite.mjs",
31
+ "es2015": "./fesm2015/hitsoft-kadooglu.kalite.mjs",
32
+ "node": "./fesm2015/hitsoft-kadooglu.kalite.mjs",
33
+ "default": "./fesm2020/hitsoft-kadooglu.kalite.mjs"
34
+ },
35
+ "./config": {
36
+ "types": "./config/index.d.ts",
37
+ "esm2020": "./esm2020/config/hitsoft-kadooglu.kalite-config.mjs",
38
+ "es2020": "./fesm2020/hitsoft-kadooglu.kalite-config.mjs",
39
+ "es2015": "./fesm2015/hitsoft-kadooglu.kalite-config.mjs",
40
+ "node": "./fesm2015/hitsoft-kadooglu.kalite-config.mjs",
41
+ "default": "./fesm2020/hitsoft-kadooglu.kalite-config.mjs"
42
+ }
43
+ },
44
+ "sideEffects": false
6
45
  }
@@ -0,0 +1,12 @@
1
+ export * from './lib/components/kalite.component';
2
+ export * from './lib/components/process-analysis.component';
3
+ export * from './lib/components/quality-parameters.component';
4
+ export * from './lib/models/quality.models';
5
+ export * from './lib/services/quality-api.service';
6
+ export * from './lib/services/kalite.service';
7
+ export * from './lib/kalite.module';
8
+ export * from './lib/kalite-notification.module';
9
+ export * from './lib/models/intake.models';
10
+ export * from './lib/components/intake-list.component';
11
+ export * from './lib/components/intake-form.component';
12
+ export * from './lib/components/quality-notifications.component';