feat: add time zone support for rent payment and refund processes
- Updated API requests and responses to include time zone information. - Modified backend services to handle time zone for received and refunded dates. - Adjusted frontend components to use local date formatting based on the user's time zone. - Enhanced tests to validate time zone handling in rent payment and refund scenarios.
This commit is contained in:
1 parent
b9e99348f7
commit
d7a7aff3ee
15 files changed
+150
-60
No files matched your search
+3
-2
@@ -14,7 +14,7 @@ import { MatInputModule } from '@angular/material/input';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { finalize } from 'rxjs';
|
||||
import { httpErrorMessage } from '../../services/http-error-message';
|
||||
import { formatEuro, utcIsoDate } from '../../services/rent-payment-format';
|
||||
import { browserTimeZone, formatEuro, localIsoDate } from '../../services/rent-payment-format';
|
||||
import { RentPayment, RentPaymentService } from '../../services/rent-payment.service';
|
||||
import { isRentPaymentDataStale, RENT_PAYMENT_DATA_STALE } from '../rent-payment-dialog-result';
|
||||
|
||||
@@ -36,7 +36,7 @@ export class RentPaymentRefundDialog {
|
||||
private readonly dialogRef = inject(MatDialogRef<RentPaymentRefundDialog>);
|
||||
private readonly payments = inject(RentPaymentService);
|
||||
private readonly operationId = crypto.randomUUID();
|
||||
readonly today = utcIsoDate();
|
||||
readonly today = localIsoDate();
|
||||
readonly saving = signal(false);
|
||||
readonly error = signal('');
|
||||
readonly formatEuro = formatEuro;
|
||||
@@ -65,6 +65,7 @@ export class RentPaymentRefundDialog {
|
||||
.refund(this.payment.id, {
|
||||
operationId: this.operationId,
|
||||
paymentVersion: this.payment.version,
|
||||
timeZone: browserTimeZone,
|
||||
...this.form.getRawValue(),
|
||||
})
|
||||
.pipe(finalize(() => this.saving.set(false)))
|
||||
|
||||
Reference in new issue
Block a user