(refactor) locationActions: add timestamp for utility bills proof of payment upload
This commit is contained in:
@@ -658,7 +658,10 @@ export const uploadUtilBillsProofOfPayment = async (locationID: string, formData
|
|||||||
await dbClient.collection<BillingLocation>("lokacije")
|
await dbClient.collection<BillingLocation>("lokacije")
|
||||||
.updateOne(
|
.updateOne(
|
||||||
{ _id: locationID },
|
{ _id: locationID },
|
||||||
{ $set: { utilBillsProofOfPaymentAttachment: attachment } }
|
{ $set: {
|
||||||
|
utilBillsProofOfPaymentAttachment: attachment,
|
||||||
|
utilBillsProofOfPaymentUploadedAt: new Date()
|
||||||
|
} }
|
||||||
);
|
);
|
||||||
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ export interface BillingLocation {
|
|||||||
seenByTenant?: boolean | null;
|
seenByTenant?: boolean | null;
|
||||||
/** (optional) utility bills proof of payment attachment */
|
/** (optional) utility bills proof of payment attachment */
|
||||||
utilBillsProofOfPaymentAttachment?: BillAttachment|null;
|
utilBillsProofOfPaymentAttachment?: BillAttachment|null;
|
||||||
|
/** (optional) date when utility bills proof of payment was uploaded */
|
||||||
|
utilBillsProofOfPaymentUploadedAt?: Date|null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum BilledTo {
|
export enum BilledTo {
|
||||||
|
|||||||
Reference in New Issue
Block a user