(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")
|
||||
.updateOne(
|
||||
{ _id: locationID },
|
||||
{ $set: { utilBillsProofOfPaymentAttachment: attachment } }
|
||||
{ $set: {
|
||||
utilBillsProofOfPaymentAttachment: attachment,
|
||||
utilBillsProofOfPaymentUploadedAt: new Date()
|
||||
} }
|
||||
);
|
||||
|
||||
return { success: true };
|
||||
|
||||
@@ -71,6 +71,8 @@ export interface BillingLocation {
|
||||
seenByTenant?: boolean | null;
|
||||
/** (optional) utility bills proof of payment attachment */
|
||||
utilBillsProofOfPaymentAttachment?: BillAttachment|null;
|
||||
/** (optional) date when utility bills proof of payment was uploaded */
|
||||
utilBillsProofOfPaymentUploadedAt?: Date|null;
|
||||
};
|
||||
|
||||
export enum BilledTo {
|
||||
|
||||
Reference in New Issue
Block a user