law-common 1.2.58-beta.4 → 1.2.58-beta.6
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/dist/src/api/index.d.ts +12 -1
- package/dist/src/api/index.js +12 -1
- package/dist/src/api/interface/bank.create.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/bank.entity.api.d.ts +3 -0
- package/dist/src/api/interface/bank.entity.api.js +2 -0
- package/dist/src/api/interface/bank.entity.response.d.ts +4 -0
- package/dist/src/api/interface/bank.entity.response.js +2 -0
- package/dist/src/api/interface/bank.update.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/bank.update.dto.interface.js +2 -0
- package/dist/src/api/interface/billing.entity.response.d.ts +8 -1
- package/dist/src/api/interface/billing.payment.create.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/billing.payment.create.dto.interface.js +2 -0
- package/dist/src/api/interface/billing.payment.entity.api.d.ts +3 -0
- package/dist/src/api/interface/billing.payment.entity.api.js +2 -0
- package/dist/src/api/interface/billing.payment.update.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/billing.payment.update.dto.interface.js +2 -0
- package/dist/src/api/interface/billing.update.dto.interface.d.ts +22 -0
- package/dist/src/api/interface/billing.update.dto.interface.js +2 -0
- package/dist/src/api/interface/client.affiliate.create.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/client.affiliate.create.dto.interface.js +2 -0
- package/dist/src/api/interface/client.affiliate.entity.api.d.ts +3 -0
- package/dist/src/api/interface/client.affiliate.entity.api.js +2 -0
- package/dist/src/api/interface/client.affiliate.update.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/client.affiliate.update.dto.interface.js +2 -0
- package/dist/src/api/interface/project.response.interface.js +2 -0
- package/dist/src/entities/enums/billing.payment.type.enum.d.ts +4 -0
- package/dist/src/entities/enums/billing.payment.type.enum.js +8 -0
- package/dist/src/entities/enums/billing.status.enum.d.ts +9 -0
- package/dist/src/entities/enums/billing.status.enum.js +13 -0
- package/dist/src/entities/enums/user.entity.enum.d.ts +4 -1
- package/dist/src/entities/enums/user.entity.enum.js +5 -2
- package/dist/src/entities/index.d.ts +5 -0
- package/dist/src/entities/index.js +5 -0
- package/dist/src/entities/interface/bank.entity.interface.d.ts +14 -0
- package/dist/src/entities/interface/bank.entity.interface.js +2 -0
- package/dist/src/entities/interface/billing.entity.interface.d.ts +3 -0
- package/dist/src/entities/interface/billing_payment.entity.interface.d.ts +12 -0
- package/dist/src/entities/interface/billing_payment.entity.interface.js +2 -0
- package/dist/src/entities/interface/client_affiliate_entity.interface.d.ts +11 -0
- package/dist/src/entities/interface/client_affiliate_entity.interface.js +2 -0
- package/dist/src/entities/interface/office.location.entity.d.ts +1 -0
- package/dist/src/model/entities/interface/timesheet.model.interface.d.ts +3 -0
- package/dist/src/model/entities/interface/timesheet.model.interface.js +2 -0
- package/dist/src/model/entities/timesheet.model.d.ts +25 -0
- package/dist/src/model/entities/timesheet.model.js +35 -0
- package/package.json +1 -1
- /package/dist/src/api/interface/{billing.response.interface.js → bank.create.dto.interface.js} +0 -0
- /package/dist/src/api/interface/{billing.response.interface.d.ts → project.response.interface.d.ts} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export * from "./interface/rate.entity.response";
|
|
|
17
17
|
export * from "./interface/client.entity.response";
|
|
18
18
|
export * from "./interface/project.entity.response";
|
|
19
19
|
export * from "./interface/timesheet.entity.response.interface";
|
|
20
|
-
export * from "./interface/
|
|
20
|
+
export * from "./interface/project.response.interface";
|
|
21
21
|
export * from "./interface/reimbursement.entity.response";
|
|
22
22
|
export * from "./interface/expense_type.create.dto.interface";
|
|
23
23
|
export * from "./interface/task.create.dto.interface";
|
|
@@ -32,3 +32,14 @@ export * from "./interface/office.Location.update.dto.interface";
|
|
|
32
32
|
export * from "./interface/office.location.entity.response";
|
|
33
33
|
export * from "./interface/billing.timesheet.entity.api";
|
|
34
34
|
export * from "./interface/billing.entity.api";
|
|
35
|
+
export * from "./interface/billing.update.dto.interface";
|
|
36
|
+
export * from "./interface/bank.create.dto.interface";
|
|
37
|
+
export * from "./interface/bank.update.dto.interface";
|
|
38
|
+
export * from "./interface/bank.entity.api";
|
|
39
|
+
export * from "./interface/bank.entity.response";
|
|
40
|
+
export * from "./interface/billing.payment.create.dto.interface";
|
|
41
|
+
export * from "./interface/billing.payment.entity.api";
|
|
42
|
+
export * from "./interface/billing.payment.update.dto.interface";
|
|
43
|
+
export * from "./interface/client.affiliate.create.dto.interface";
|
|
44
|
+
export * from "./interface/client.affiliate.update.dto.interface";
|
|
45
|
+
export * from "./interface/client.affiliate.entity.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __exportStar(require("./interface/rate.entity.response"), exports);
|
|
|
33
33
|
__exportStar(require("./interface/client.entity.response"), exports);
|
|
34
34
|
__exportStar(require("./interface/project.entity.response"), exports);
|
|
35
35
|
__exportStar(require("./interface/timesheet.entity.response.interface"), exports);
|
|
36
|
-
__exportStar(require("./interface/
|
|
36
|
+
__exportStar(require("./interface/project.response.interface"), exports);
|
|
37
37
|
__exportStar(require("./interface/reimbursement.entity.response"), exports);
|
|
38
38
|
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
39
39
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
@@ -48,3 +48,14 @@ __exportStar(require("./interface/office.Location.update.dto.interface"), export
|
|
|
48
48
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
49
49
|
__exportStar(require("./interface/billing.timesheet.entity.api"), exports);
|
|
50
50
|
__exportStar(require("./interface/billing.entity.api"), exports);
|
|
51
|
+
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
52
|
+
__exportStar(require("./interface/bank.create.dto.interface"), exports);
|
|
53
|
+
__exportStar(require("./interface/bank.update.dto.interface"), exports);
|
|
54
|
+
__exportStar(require("./interface/bank.entity.api"), exports);
|
|
55
|
+
__exportStar(require("./interface/bank.entity.response"), exports);
|
|
56
|
+
__exportStar(require("./interface/billing.payment.create.dto.interface"), exports);
|
|
57
|
+
__exportStar(require("./interface/billing.payment.entity.api"), exports);
|
|
58
|
+
__exportStar(require("./interface/billing.payment.update.dto.interface"), exports);
|
|
59
|
+
__exportStar(require("./interface/client.affiliate.create.dto.interface"), exports);
|
|
60
|
+
__exportStar(require("./interface/client.affiliate.update.dto.interface"), exports);
|
|
61
|
+
__exportStar(require("./interface/client.affiliate.entity.api"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAuditColumnEntity, IBillingTimesheetDetail, PaymentStatusEnum } from "../../entities";
|
|
1
|
+
import { IAuditColumnEntity, IBillingTimesheetDetail, PaymentStatusEnum, StatusEnum } from "../../entities";
|
|
2
2
|
import { IBillingApiEntity } from "./billing.entity.api";
|
|
3
3
|
import { IBillingTimesheetApiEntity } from "./billing.timesheet.entity.api";
|
|
4
4
|
export interface IBillingEntityResponse extends IAuditColumnEntity {
|
|
@@ -11,9 +11,16 @@ export interface IBillingEntityResponse extends IAuditColumnEntity {
|
|
|
11
11
|
invoiceNumber?: number;
|
|
12
12
|
paymentStatus: PaymentStatusEnum;
|
|
13
13
|
billingTimesheets: IBillingTimesheetDetail[];
|
|
14
|
+
status?: StatusEnum;
|
|
15
|
+
writeoffAmount?: number;
|
|
14
16
|
}
|
|
15
17
|
export type IBillingEntityGet = {
|
|
16
18
|
billing: IBillingApiEntity;
|
|
17
19
|
billingTimesheets: IBillingTimesheetApiEntity[];
|
|
18
20
|
};
|
|
21
|
+
export type IBillingEntityUpdateGet = {
|
|
22
|
+
billing: IBillingApiEntity;
|
|
23
|
+
updatedTimesheets: IBillingTimesheetApiEntity[];
|
|
24
|
+
deletedTimesheets: IBillingTimesheetApiEntity[];
|
|
25
|
+
};
|
|
19
26
|
export type IBillingEntityGetArray = IBillingEntityGet[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BillingImpactEnum, BillingTimesheetStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityUpdateDto } from "../../entities";
|
|
2
|
+
export interface IBillingUpdateDto extends IEntityUpdateDto<IBillingEntity> {
|
|
3
|
+
}
|
|
4
|
+
export interface IBillingTimesheetUpdateDto extends IEntityUpdateDto<IBillingTimesheetEntity> {
|
|
5
|
+
id?: number;
|
|
6
|
+
task?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
dateCode?: string;
|
|
9
|
+
totalDuration?: number;
|
|
10
|
+
totalAmount?: number;
|
|
11
|
+
impact?: BillingImpactEnum;
|
|
12
|
+
amendmentPurpose?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IBillingTimesheetDeleteDto extends Partial<IBillingTimesheetEntity> {
|
|
15
|
+
id: number;
|
|
16
|
+
changedStatus: BillingTimesheetStatusEnum;
|
|
17
|
+
}
|
|
18
|
+
export interface IUpdateBillingDto {
|
|
19
|
+
billing?: IBillingEntity;
|
|
20
|
+
updatedTimesheets?: IBillingTimesheetUpdateDto[];
|
|
21
|
+
deletedTimesheets?: IBillingTimesheetDeleteDto[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingPaymentType = void 0;
|
|
4
|
+
var BillingPaymentType;
|
|
5
|
+
(function (BillingPaymentType) {
|
|
6
|
+
BillingPaymentType["NEFT"] = "NEFT";
|
|
7
|
+
BillingPaymentType["UTR"] = "UTR";
|
|
8
|
+
})(BillingPaymentType || (exports.BillingPaymentType = BillingPaymentType = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusEnum = void 0;
|
|
4
|
+
var StatusEnum;
|
|
5
|
+
(function (StatusEnum) {
|
|
6
|
+
StatusEnum["PENDING"] = "PENDING";
|
|
7
|
+
StatusEnum["CLIENT_REVIEW"] = "CLIENT_REVIEW";
|
|
8
|
+
StatusEnum["APPROVED"] = "APPROVED";
|
|
9
|
+
StatusEnum["PAYMENT_PENDING"] = "PAYMENT_PENDING";
|
|
10
|
+
StatusEnum["PAYMENT_DONE"] = "PAYMENT_DONE";
|
|
11
|
+
StatusEnum["CLIENT_REVISION"] = "CLIENT_REVISION";
|
|
12
|
+
StatusEnum["CANCELLED"] = "CANCELLED";
|
|
13
|
+
})(StatusEnum || (exports.StatusEnum = StatusEnum = {}));
|
|
@@ -7,7 +7,10 @@ export declare enum UserRoleEnum {
|
|
|
7
7
|
admin = "admin",
|
|
8
8
|
employee = "employee",
|
|
9
9
|
partner = "partner",
|
|
10
|
-
accountant = "accountant"
|
|
10
|
+
accountant = "accountant",
|
|
11
|
+
owner = "owner",
|
|
12
|
+
secretary = "secretary",
|
|
13
|
+
hr = "hr"
|
|
11
14
|
}
|
|
12
15
|
export declare namespace UserRoleEnum {
|
|
13
16
|
function getNames(): string[];
|
|
@@ -13,16 +13,19 @@ var UserRoleEnum;
|
|
|
13
13
|
UserRoleEnum["employee"] = "employee";
|
|
14
14
|
UserRoleEnum["partner"] = "partner";
|
|
15
15
|
UserRoleEnum["accountant"] = "accountant";
|
|
16
|
+
UserRoleEnum["owner"] = "owner";
|
|
17
|
+
UserRoleEnum["secretary"] = "secretary";
|
|
18
|
+
UserRoleEnum["hr"] = "hr";
|
|
16
19
|
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
17
20
|
(function (UserRoleEnum) {
|
|
18
21
|
function getNames() {
|
|
19
|
-
return Object.values(UserRoleEnum).filter(value => typeof value ===
|
|
22
|
+
return Object.values(UserRoleEnum).filter((value) => typeof value === "string");
|
|
20
23
|
}
|
|
21
24
|
UserRoleEnum.getNames = getNames;
|
|
22
25
|
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
23
26
|
(function (UserStatusEnum) {
|
|
24
27
|
function getNames() {
|
|
25
|
-
return Object.values(UserStatusEnum).filter(value => typeof value ===
|
|
28
|
+
return Object.values(UserStatusEnum).filter((value) => typeof value === "string");
|
|
26
29
|
}
|
|
27
30
|
UserStatusEnum.getNames = getNames;
|
|
28
31
|
})(UserStatusEnum || (exports.UserStatusEnum = UserStatusEnum = {}));
|
|
@@ -23,4 +23,9 @@ export * from "./enums/billing.impact.enum";
|
|
|
23
23
|
export * from "./interface/billing.entity.interface";
|
|
24
24
|
export * from "./enums/payment_status.enum";
|
|
25
25
|
export * from "./enums/billing.timesheet.change.status.enum";
|
|
26
|
+
export * from "./enums/billing.status.enum";
|
|
26
27
|
export * from "./interface/office.location.entity";
|
|
28
|
+
export * from "./interface/bank.entity.interface";
|
|
29
|
+
export * from "./enums/billing.payment.type.enum";
|
|
30
|
+
export * from "./interface/billing_payment.entity.interface";
|
|
31
|
+
export * from "./interface/client_affiliate_entity.interface";
|
|
@@ -39,4 +39,9 @@ __exportStar(require("./enums/billing.impact.enum"), exports);
|
|
|
39
39
|
__exportStar(require("./interface/billing.entity.interface"), exports);
|
|
40
40
|
__exportStar(require("./enums/payment_status.enum"), exports);
|
|
41
41
|
__exportStar(require("./enums/billing.timesheet.change.status.enum"), exports);
|
|
42
|
+
__exportStar(require("./enums/billing.status.enum"), exports);
|
|
42
43
|
__exportStar(require("./interface/office.location.entity"), exports);
|
|
44
|
+
__exportStar(require("./interface/bank.entity.interface"), exports);
|
|
45
|
+
__exportStar(require("./enums/billing.payment.type.enum"), exports);
|
|
46
|
+
__exportStar(require("./interface/billing_payment.entity.interface"), exports);
|
|
47
|
+
__exportStar(require("./interface/client_affiliate_entity.interface"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
|
+
import { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
+
export interface IBankEntity extends IAuditColumnEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
accountName: string;
|
|
6
|
+
organizationId: number;
|
|
7
|
+
name: string;
|
|
8
|
+
accountNo: number;
|
|
9
|
+
branchAddress: string;
|
|
10
|
+
micrCode: number;
|
|
11
|
+
ifscCode: string;
|
|
12
|
+
emailForPaymentInfo: string;
|
|
13
|
+
}
|
|
14
|
+
export type IBankEntityFilterData = IEntityFilterData<IBankEntity>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BillingImpactEnum } from "../enums/billing.impact.enum";
|
|
2
|
+
import { StatusEnum } from "../enums/billing.status.enum";
|
|
2
3
|
import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
|
|
3
4
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
4
5
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
@@ -12,6 +13,8 @@ export interface IBillingEntity extends IAuditColumnEntity {
|
|
|
12
13
|
totalMinutes: number;
|
|
13
14
|
invoiceNumber?: number;
|
|
14
15
|
paymentStatus: PaymentStatusEnum;
|
|
16
|
+
status: StatusEnum;
|
|
17
|
+
writeoffAmount: number;
|
|
15
18
|
}
|
|
16
19
|
export interface IBillingTimesheetEntity extends IAuditColumnEntity {
|
|
17
20
|
id: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BillingPaymentType } from "../enums/billing.payment.type.enum";
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
3
|
+
export interface IBillingPaymentEntity extends IAuditColumnEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
bankId: number;
|
|
6
|
+
type: BillingPaymentType;
|
|
7
|
+
transactionId: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
date: string;
|
|
10
|
+
tds: number;
|
|
11
|
+
discount: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
|
+
import { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
+
export interface IClientAffiliateEntity extends IAuditColumnEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
address: string;
|
|
7
|
+
details?: string;
|
|
8
|
+
clientId: number;
|
|
9
|
+
organizationId: number;
|
|
10
|
+
}
|
|
11
|
+
export type IClientAffiliateEntityFilterDto = IEntityFilterData<IClientAffiliateEntity>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ITimesheetEntity } from "../../entities";
|
|
2
|
+
import { ITimesheetEntityModel } from "./interface/timesheet.model.interface";
|
|
3
|
+
export declare class TimesheetEntityModel implements ITimesheetEntityModel {
|
|
4
|
+
id: number;
|
|
5
|
+
userId: number;
|
|
6
|
+
projectId: number;
|
|
7
|
+
task: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
dateCode: string;
|
|
10
|
+
totalDuration: number;
|
|
11
|
+
createdBy: number;
|
|
12
|
+
createdOn: Date;
|
|
13
|
+
updatedBy: number;
|
|
14
|
+
updatedOn: Date;
|
|
15
|
+
/**
|
|
16
|
+
* @param timesheets - Array of TimesheetModel instances
|
|
17
|
+
* @return - Array of Timesheet Model
|
|
18
|
+
*/
|
|
19
|
+
static convertToModel(timesheetsEntity: ITimesheetEntity): ITimesheetEntityModel;
|
|
20
|
+
/**
|
|
21
|
+
* @param timesheets
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
static getTotalDuration(timesheets: ITimesheetEntityModel[]): number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimesheetEntityModel = void 0;
|
|
4
|
+
class TimesheetEntityModel {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.id = 0;
|
|
7
|
+
this.userId = 0;
|
|
8
|
+
this.projectId = 0;
|
|
9
|
+
this.task = "";
|
|
10
|
+
this.description = "";
|
|
11
|
+
this.dateCode = "";
|
|
12
|
+
this.totalDuration = 0;
|
|
13
|
+
this.createdBy = 0;
|
|
14
|
+
this.createdOn = new Date();
|
|
15
|
+
this.updatedBy = 1;
|
|
16
|
+
this.updatedOn = new Date();
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @param timesheets - Array of TimesheetModel instances
|
|
20
|
+
* @return - Array of Timesheet Model
|
|
21
|
+
*/
|
|
22
|
+
static convertToModel(timesheetsEntity) {
|
|
23
|
+
const timesheetModel = Object.assign({}, timesheetsEntity);
|
|
24
|
+
return timesheetModel;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @param timesheets
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
static getTotalDuration(timesheets) {
|
|
31
|
+
const totalDurationOfEachTimesheet = timesheets.map((timesheet) => timesheet.totalDuration);
|
|
32
|
+
return totalDurationOfEachTimesheet.reduce((sum, duration) => sum + duration, 0);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.TimesheetEntityModel = TimesheetEntityModel;
|
package/package.json
CHANGED
/package/dist/src/api/interface/{billing.response.interface.js → bank.create.dto.interface.js}
RENAMED
|
File without changes
|
/package/dist/src/api/interface/{billing.response.interface.d.ts → project.response.interface.d.ts}
RENAMED
|
File without changes
|