@react-pakistan/util-functions 1.23.0 → 1.23.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.
|
@@ -4,6 +4,12 @@ interface PostCompaniesReportArgs {
|
|
|
4
4
|
queryWhere: {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
};
|
|
7
|
+
include: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
orderBy: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
7
13
|
}
|
|
8
|
-
export declare const postCompaniesReport: ({ prisma, queryWhere, }: PostCompaniesReportArgs) => Promise<Array<CompanyBE>>;
|
|
14
|
+
export declare const postCompaniesReport: ({ prisma, queryWhere, orderBy, include, }: PostCompaniesReportArgs) => Promise<Array<CompanyBE>>;
|
|
9
15
|
export {};
|
|
@@ -11,26 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.postCompaniesReport = void 0;
|
|
14
|
-
const postCompaniesReport = (_a) => __awaiter(void 0, [_a], void 0, function* ({ prisma, queryWhere, }) {
|
|
14
|
+
const postCompaniesReport = (_a) => __awaiter(void 0, [_a], void 0, function* ({ prisma, queryWhere, orderBy, include, }) {
|
|
15
15
|
const companies = yield prisma.$transaction([
|
|
16
16
|
prisma.company.count({
|
|
17
17
|
where: queryWhere,
|
|
18
18
|
}),
|
|
19
19
|
prisma.company.findMany({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
include: {
|
|
24
|
-
contacts: true,
|
|
25
|
-
quotesInvoices: {
|
|
26
|
-
where: {
|
|
27
|
-
category: 'INVOICE',
|
|
28
|
-
},
|
|
29
|
-
include: {
|
|
30
|
-
payments: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
20
|
+
include,
|
|
21
|
+
orderBy,
|
|
34
22
|
where: queryWhere,
|
|
35
23
|
}),
|
|
36
24
|
]);
|