Skip to content

Commit e6de8cd

Browse files
committed
fixed address-form component
1 parent 9653faf commit e6de8cd

File tree

26 files changed

+382
-295
lines changed

26 files changed

+382
-295
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ User password: Test12345#
7272
- MS SQL
7373
- xUnit
7474
- Moq
75-
- Angular 16
75+
- Angular 17
7676
- PrimeNG
7777
- Blazor
7878
- MAUI
79+
- Firebase
80+
- SignalR
7981
- Docker
8082
- CI/CD
8183

src/Client/Logistics.OfficeApp/src/app/core/helpers/regexPatterns.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export abstract class RegexPatterns {
2-
static readonly CREDIT_CARD_NUMBER = '^[0-9]{16}$';
2+
static readonly CREDIT_CARD_NUMBER = '^(\\d{4} \\d{4} \\d{4} \\d{4})$'; //'^[0-9]{16}$';
33
static readonly CARD_EXPIRATION_DATE = '(0[1-9]|1[0-2])/[0-9]{2}'; // MM/YY format
44
static readonly CARD_CVV = '^[0-9]{3,4}$'; // CVV 3 or 4 digits
55
static readonly ROUTING_NUMBER = '^[0-9]{9}$'; // 9 digit routing number

src/Client/Logistics.OfficeApp/src/app/core/models/payment/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export * from './createPayment';
22
export * from './payment';
33
export * from './subscriptionPayment';
44
export * from './updatePayment';
5+
export * from './processPayment';

src/Client/Logistics.OfficeApp/src/app/core/models/payment/payment.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ export interface Payment {
99
amount: number;
1010
status: PaymentStatus;
1111
paymentFor: PaymentFor;
12+
billingAddress?: string;
1213
comment?: string;
1314
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {PaymentMethod} from '@core/enums';
2+
3+
4+
export interface ProcessPayment {
5+
paymentId: string;
6+
paymentMethod: PaymentMethod;
7+
cardholderName?: string;
8+
cardNumber?: string;
9+
cardExpirationDate?: string;
10+
cardCvv?: string;
11+
bankName?: string;
12+
bankAccountNumber?: string;
13+
bankRoutingNumber?: string;
14+
billingAddress: string;
15+
}

src/Client/Logistics.OfficeApp/src/app/core/services/api.service.ts

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
Payroll,
4343
UpdatePayroll,
4444
CreatePayroll,
45+
ProcessPayment,
4546
} from '../models';
4647

4748

@@ -297,6 +298,11 @@ export class ApiService {
297298
return this.get(url);
298299
}
299300

301+
processPayment(command: ProcessPayment): Observable<ResponseResult> {
302+
const url = `/payments/process-payment`;
303+
return this.post(url, command);
304+
}
305+
300306
createPayment(command: CreatePayment): Observable<ResponseResult> {
301307
const url = `/payments`;
302308
return this.post(url, command);

src/Client/Logistics.OfficeApp/src/app/pages/accounting/edit-payroll/edit-payroll.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import {DropdownModule} from 'primeng/dropdown';
88
import {AutoCompleteModule, AutoCompleteOnSelectEvent} from 'primeng/autocomplete';
99
import {ProgressSpinnerModule} from 'primeng/progressspinner';
1010
import {CalendarModule} from 'primeng/calendar';
11+
import {ButtonModule} from 'primeng/button';
1112
import {CreatePayroll, Employee, Payroll, UpdatePayroll} from '@core/models';
1213
import {ApiService, ToastService} from '@core/services';
1314
import {PredefinedDateRanges} from '@core/helpers';
1415
import {SalaryType, SalaryTypeEnum} from '@core/enums';
1516
import {ValidationSummaryComponent} from '@shared/components';
1617
import {DateUtils} from '@shared/utils';
17-
import { ButtonModule } from 'primeng/button';
1818

1919

2020
@Component({

src/Client/Logistics.OfficeApp/src/app/pages/accounting/list-payments/list-payments.component.html

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ <h1>Payments for the past 90 days</h1>
5656
Payment For
5757
<p-sortIcon field="paymentFor"></p-sortIcon>
5858
</th>
59+
<th pSortableColumn="billingAddress">
60+
Billing Address
61+
<p-sortIcon field="billingAddress"></p-sortIcon>
62+
</th>
5963
<th pSortableColumn="comment">
6064
Comment
6165
<p-sortIcon field="comment"></p-sortIcon>
@@ -75,6 +79,7 @@ <h1>Payments for the past 90 days</h1>
7579
</p-tag>
7680
</td>
7781
<td>{{getPaymentForDesc(payment.paymentFor)}}</td>
82+
<td>{{payment.billingAddress}}</td>
7883
<td>{{payment.comment}}</td>
7984
</tr>
8085
</ng-template>

src/Client/Logistics.OfficeApp/src/app/pages/payment/components/payroll-details/payroll-details.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ <h6>Salary:</h6>
3939
</div>
4040
<div class="col-8">
4141
@if (payroll.employee.salaryType === salaryType.ShareOfGross) {
42-
{{payroll.employee.salary | percent}}
42+
{{payroll.employee.salary | percent}}
4343
}
4444
@else {
45-
{{payroll.employee.salary | currency}}
45+
{{payroll.employee.salary | currency}}
4646
}
4747
</div>
4848
</div>

src/Client/Logistics.OfficeApp/src/app/pages/payment/make-payment/make-payment.component.html

-96
This file was deleted.

src/Client/Logistics.OfficeApp/src/app/pages/payment/make-payment/make-payment.component.ts

-168
This file was deleted.

0 commit comments

Comments
 (0)