forked from Yara724/api
Compare commits
3 Commits
5d1110b6e9
...
c955deda5c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c955deda5c | ||
|
|
9b83db882b | ||
|
|
bced6a0ec7 |
@@ -3,6 +3,7 @@ import { Type } from "class-transformer";
|
|||||||
import {
|
import {
|
||||||
IsIn,
|
IsIn,
|
||||||
IsInt,
|
IsInt,
|
||||||
|
IsISO8601,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsString,
|
IsString,
|
||||||
Max,
|
Max,
|
||||||
@@ -102,4 +103,20 @@ export class ListQueryV2Dto {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsIn([...LIST_FILE_TYPE_V2])
|
@IsIn([...LIST_FILE_TYPE_V2])
|
||||||
fileType?: ListFileTypeV2;
|
fileType?: ListFileTypeV2;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({
|
||||||
|
description: "Filter start date (ISO 8601). Only files created on or after this date are returned.",
|
||||||
|
example: "2025-01-01T00:00:00.000Z",
|
||||||
|
})
|
||||||
|
@IsOptional()
|
||||||
|
@IsISO8601({ strict: false })
|
||||||
|
startDate?: string;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({
|
||||||
|
description: "Filter end date (ISO 8601). Only files created on or before this date are returned.",
|
||||||
|
example: "2025-12-31T23:59:59.999Z",
|
||||||
|
})
|
||||||
|
@IsOptional()
|
||||||
|
@IsISO8601({ strict: false })
|
||||||
|
endDate?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -630,11 +630,21 @@ export class ExpertBlameService {
|
|||||||
String((d as { publicId?: string }).publicId ?? ""),
|
String((d as { publicId?: string }).publicId ?? ""),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
const filtered = this.filterBlameDocsByUnifiedStatus(
|
let filtered = this.filterBlameDocsByUnifiedStatus(
|
||||||
visibleCases,
|
visibleCases,
|
||||||
claimByPublicId,
|
claimByPublicId,
|
||||||
query.unifiedStatus,
|
query.unifiedStatus,
|
||||||
);
|
);
|
||||||
|
const { fromDate, toDate } = parseListDateRange(query.startDate, query.endDate);
|
||||||
|
if (fromDate || toDate) {
|
||||||
|
filtered = filtered.filter((doc) =>
|
||||||
|
isInListDateRange(
|
||||||
|
(doc as { createdAt?: Date }).createdAt,
|
||||||
|
fromDate,
|
||||||
|
toDate,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const paged = applyListQueryV2(
|
const paged = applyListQueryV2(
|
||||||
filtered,
|
filtered,
|
||||||
|
|||||||
@@ -3517,7 +3517,7 @@ export class ExpertClaimService {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
claimRequestId,
|
claimRequestId,
|
||||||
status: claim.status,
|
status: ClaimWorkflowStep.CLAIM_COMPLETED,
|
||||||
claimStatus: ClaimStatus.NEEDS_REVISION,
|
claimStatus: ClaimStatus.NEEDS_REVISION,
|
||||||
message: "In-person visit requested. User will be notified.",
|
message: "In-person visit requested. User will be notified.",
|
||||||
};
|
};
|
||||||
@@ -3748,6 +3748,12 @@ export class ExpertClaimService {
|
|||||||
(item) => item.unifiedFileStatus === query.unifiedStatus,
|
(item) => item.unifiedFileStatus === query.unifiedStatus,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const { fromDate, toDate } = parseListDateRange(query.startDate, query.endDate);
|
||||||
|
if (fromDate || toDate) {
|
||||||
|
filtered = filtered.filter((item) =>
|
||||||
|
isInListDateRange(item.createdAt, fromDate, toDate),
|
||||||
|
);
|
||||||
|
}
|
||||||
const paged = applyListQueryV2(
|
const paged = applyListQueryV2(
|
||||||
filtered,
|
filtered,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1334,6 +1334,12 @@ export class ExpertInsurerService {
|
|||||||
(f) => f.unifiedFileStatus === query.unifiedStatus,
|
(f) => f.unifiedFileStatus === query.unifiedStatus,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const { fromDate, toDate } = parseListDateRange(query.startDate, query.endDate);
|
||||||
|
if (fromDate || toDate) {
|
||||||
|
files = files.filter((f) =>
|
||||||
|
isInListDateRange(f.createdAt, fromDate, toDate),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const paged = applyListQueryV2(
|
const paged = applyListQueryV2(
|
||||||
files,
|
files,
|
||||||
|
|||||||
@@ -218,5 +218,9 @@
|
|||||||
"دمنده بخاری": false,
|
"دمنده بخاری": false,
|
||||||
"کمپرسور کولر": false,
|
"کمپرسور کولر": false,
|
||||||
"کندانسور": false,
|
"کندانسور": false,
|
||||||
"اواپراتور": false
|
"اواپراتور": false,
|
||||||
|
"لاستیک": false,
|
||||||
|
"مه شکن": false,
|
||||||
|
"رینگ": false,
|
||||||
|
"فن": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user