Renamed Service Charges to Incentives including account fixture and permission
replaced my custom ValidationErro with FastAPI HTTPException Fixed?: Attendance Employee Attendance
This commit is contained in:
@ -119,7 +119,7 @@ const appRoutes: Routes = [
|
||||
loadChildren: () => import('./receipt/receipt.module').then(mod => mod.ReceiptModule)
|
||||
},
|
||||
{
|
||||
path: 'return',
|
||||
path: 'purchase-return',
|
||||
loadChildren: () => import('./purchase-return/purchase-return.module').then(mod => mod.PurchaseReturnModule)
|
||||
},
|
||||
{
|
||||
|
||||
@ -40,7 +40,7 @@ export class VoucherService {
|
||||
}
|
||||
|
||||
getIncentive(date: string): Observable<Voucher> {
|
||||
const options = {params: new HttpParams().set('t', 'Service Charge').set('d', date)};
|
||||
const options = {params: new HttpParams().set('t', 'Incentive').set('d', date)};
|
||||
return <Observable<Voucher>>this.http.get<Voucher>(url, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
|
||||
@ -16,7 +16,7 @@ export class IncentiveResolver implements Resolve<Voucher> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Voucher> {
|
||||
const id = route.paramMap.get('id');
|
||||
if (id === null) {
|
||||
return this.ser.getOfType('Service Charge');
|
||||
return this.ser.getOfType('Incentive');
|
||||
} else {
|
||||
return this.ser.get(id);
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ const incentiveRoutes: Routes = [
|
||||
component: IncentiveComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Service Charge'
|
||||
permission: 'Incentive'
|
||||
},
|
||||
resolve: {
|
||||
voucher: IncentiveResolver
|
||||
@ -23,7 +23,7 @@ const incentiveRoutes: Routes = [
|
||||
component: IncentiveComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Service Charge'
|
||||
permission: 'Incentive'
|
||||
},
|
||||
resolve: {
|
||||
voucher: IncentiveResolver
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
|
||||
Total Service Charge: <strong>{{voucher.incentive | number:'1.2-2'}}</strong>
|
||||
Total Incentive: <strong>{{voucher.incentive | number:'1.2-2'}}</strong>
|
||||
Total Points: <strong>{{totalPoints() | number:'1.2-2'}}</strong>
|
||||
Point Value: <strong>{{pointValue() | number:'1.2-2'}}</strong>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user