payment mode
This commit is contained in:
parent
2edad65476
commit
34146c7a71
@ -61,6 +61,15 @@
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Client Address </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].address_1}} {{row.customer[0].city}} {{row.customer[0].state}}</td>
|
||||
</ng-container> -->
|
||||
<ng-container matColumnDef="paymentStatus">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Payment Status </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{'positive' :row.paymentStatus == 1,'cancelStatus' : row.paymentStatus == 0}"> <b>{{row.paymentStatus == 1 ? 'Paid' : 'Not Paid'}}</b></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="paymentMode">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Payment Mode </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> <b>{{row.paymentMode == '' ? '-' : row.paymentMode}}</b></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Status </th>
|
||||
|
||||
@ -34,7 +34,7 @@ export interface UsersData {
|
||||
export class AppoinmentsListComponent implements OnInit {
|
||||
|
||||
push: any;
|
||||
displayedColumns: string[] = ['id','ClientName','datetime','phoneNo','email','status', 'action'];
|
||||
displayedColumns: string[] = ['id','ClientName','datetime','phoneNo','email','paymentStatus','paymentMode','status', 'action'];
|
||||
public appointmentListLength: number;
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
<span *ngFor="let slot1 of slots;let j=index">
|
||||
<!-- <button *ngFor="let slot of slot1;let i=index" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i && checkSlotDur(slot,i)==1,'clickedSlot':slotIndex == i && checkSlotDur(slot,i)==1 }" (click)="toggleActive($event,slot,i)" ><span *ngIf="checkSlotDur(slot,i)==1">{{slot | date:'shortTime'}}</span></button> -->
|
||||
<a *ngFor="let slot of slot1;let i=index">
|
||||
<button *ngIf="checkSlotDur(slot,i,slot1)==1" type="button" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton primary" [ngClass]="{'primary':slotIndex != slot ,'clickedSlot':slotIndex == slot && slots_select ==slot1 && slotIndex_group == j}" (click)="toggleActive($event,slot,i,slot1,j)" ><span >{{slot| date:'shortTime' }}</span></button>
|
||||
<button *ngIf="checkSlotDur(slot,i,slot1)==1" type="button" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton primary" [ngClass]="{'primary':slotIndex != slot ,'clickedSlot':slotIndex == slot }" (click)="toggleActive($event,slot,i,slot1,j)" ><span >{{slot| date:'shortTime' }}</span></button>
|
||||
</a>
|
||||
</span>
|
||||
<!-- <button type="button" *ngFor="let slot of slots;let i=index" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i && checkSlotDur(slot,i)==1,'clickedSlot':slotIndex == i && checkSlotDur(slot,i)==1 }" (click)="toggleActive($event,slot,i)"><span *ngIf="checkSlotDur(slot,i)==1">{{slot | date:'shortTime'}}</span></button> -->
|
||||
@ -150,9 +150,9 @@
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane" formControlName="paymentMode" *ngIf="form.get('paymentStatus').value == 1">
|
||||
<mat-form-field appearance="outline" class="mat-pane" *ngIf="form.get('paymentStatus').value == 1">
|
||||
<mat-label>Payment Mode</mat-label>
|
||||
<mat-select placeholder="Select Payment" required>
|
||||
<mat-select placeholder="Select Payment Mode" formControlName="paymentMode" required>
|
||||
<mat-option value="Cash">Cash</mat-option>
|
||||
<mat-option value="UPI">UPI</mat-option>
|
||||
<mat-option value="Card">Card</mat-option>
|
||||
|
||||
@ -166,7 +166,7 @@ $tem-color : #217e69;
|
||||
}
|
||||
.cardDesign{
|
||||
border: 1px solid #e8edef;
|
||||
width: 89%;
|
||||
width: 85%;
|
||||
background-color: #227f6e21;
|
||||
box-shadow: 0 2px 0 #00000008
|
||||
}
|
||||
|
||||
@ -111,7 +111,6 @@ export class DialogBoxComponent implements OnInit {
|
||||
practiId: any;
|
||||
isSubmitting: boolean = false;
|
||||
selectedRadioValue: any;
|
||||
paymentMode: boolean = false;
|
||||
slotIndex_group:any=[];
|
||||
slotslength:any=[];
|
||||
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
|
||||
@ -435,6 +434,11 @@ export class DialogBoxComponent implements OnInit {
|
||||
console.log(this.form.value,this.slotsResult,this.days[this.clicks]);
|
||||
// if(this.slotsResult == undefined){
|
||||
// }
|
||||
if(this.form.value.paymentStatus == 0){
|
||||
console.log('paymentmode')
|
||||
this.form.controls['paymentMode'].clearValidators();
|
||||
this.form.controls['paymentMode'].updateValueAndValidity();
|
||||
}
|
||||
if(this.slotsResult.length == 0){
|
||||
console.log(this.slotsResult.length == 0)
|
||||
this.notifierService.notify('warning', 'Please Select Slots');
|
||||
@ -464,7 +468,7 @@ export class DialogBoxComponent implements OnInit {
|
||||
"busId":localStorage.getItem('busId')
|
||||
}
|
||||
this.end_user.CreatecusServicesMapDetails(paramsmap).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
if (res.status == 200) {
|
||||
let serviceMap = res['data'][0].id
|
||||
let paramsData:any= {
|
||||
"busId": localStorage.getItem('busId'),
|
||||
@ -472,8 +476,10 @@ export class DialogBoxComponent implements OnInit {
|
||||
"appoinmentDate": this.days[this.clicks],
|
||||
"appoinmentTime": this.form.value.appoinmentTime,
|
||||
"serviceMap":serviceMap,
|
||||
"appoinmentSlots": JSON.stringify(this.slotsResult)
|
||||
"appoinmentSlots": JSON.stringify(this.slotsResult),
|
||||
//"servicemap" :this.bookedAppointment_servicemap
|
||||
"paymentStatus": this.form.value.paymentStatus,
|
||||
"paymentMode": this.form.value.paymentMode
|
||||
}
|
||||
if(this.local_data.hasOwnProperty('id')){
|
||||
paramsData.id =this.local_data.id
|
||||
@ -603,13 +609,11 @@ console.log(params)
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
let len =[];
|
||||
this.slots.forEach(element => {
|
||||
|
||||
let len =[];
|
||||
this.slots.forEach(element => {
|
||||
len.push( element.length)
|
||||
})
|
||||
console.log(len)
|
||||
|
||||
this.slotslength = len.reduce((a, b) => a + b, 0)
|
||||
}
|
||||
})
|
||||
|
||||
@ -34,9 +34,9 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-green icon-tp">
|
||||
<div class="text-center">
|
||||
<i class="fa fa-twitter fa-3x"></i>
|
||||
<i class="fa fa fa-money fa-3x align-self-center"></i>
|
||||
<div class="d-inline-block">
|
||||
<h5>Twitter</h5>
|
||||
<h5>Earnings</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -44,13 +44,13 @@
|
||||
<div class="card-block text-center">
|
||||
<div class="row">
|
||||
<div>
|
||||
<h2>76</h2>
|
||||
<p class="text-muted">Online</p>
|
||||
<h2>{{count.total_earning_count == null ? 0 : count.total_earning_count}}</h2>
|
||||
<p class="text-muted">Total</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<h2>19</h2>
|
||||
<p class="text-muted">Comment</p>
|
||||
<h2>{{count.monthly_earning_count == null ? 0 : count.monthly_earning_count}}</h2>
|
||||
<p class="text-muted">Monthly</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -172,7 +172,7 @@
|
||||
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="50" class="m-gap p-gap">
|
||||
<mat-card>
|
||||
<mat-card-title fxLayout="row" fxLayoutAlign="start center">
|
||||
Revenue
|
||||
Practitioner
|
||||
<span fxFlex></span>
|
||||
</mat-card-title>
|
||||
<hr>
|
||||
|
||||
@ -34,18 +34,18 @@ export class DashboardComponent {
|
||||
}
|
||||
};
|
||||
|
||||
pieChartData: number[] = [300, 500, 100];
|
||||
pieChartData: number[] = [];
|
||||
doughnutOptions: any = Object.assign({
|
||||
elements: {
|
||||
arc: {
|
||||
borderWidth: 5
|
||||
borderWidth: 3
|
||||
}
|
||||
}
|
||||
}, this.globalChartOptions);
|
||||
doughnutChartColors: any[] = [{
|
||||
backgroundColor: ['#673ab7', '#f44336', '#009688 ', '#2196f3']
|
||||
backgroundColor: ['#f44336', '#009688 ', '#2196f3']
|
||||
}];
|
||||
pieChartLabels: string[] = ['Download Sales', 'In-Store Sales', 'Mail Sales'];
|
||||
pieChartLabels: string[] = ['Customer', 'Services', 'Practitioner'];
|
||||
pieChartType = 'pie';
|
||||
|
||||
// Bar
|
||||
@ -215,15 +215,25 @@ messages: Object[] = [{
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let buiId = {'busId':localStorage.getItem('busId')}
|
||||
this.getCount(buiId)
|
||||
let user_role = localStorage.getItem('user_role')
|
||||
let param
|
||||
if(user_role == 'PRACTITIONER'){
|
||||
param = {'user_id':localStorage.getItem('user_id'),'busId':localStorage.getItem('busId')}
|
||||
}else{
|
||||
param = {'busId':localStorage.getItem('busId')}
|
||||
}
|
||||
|
||||
this.getCount(param)
|
||||
}
|
||||
|
||||
getCount(param){
|
||||
|
||||
console.log(param)
|
||||
this._dash.getCountDetails(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
this.count = res['data']
|
||||
this.pieChartData.push(this.count.customer_count, this.count.practitioner_count, this.count.service_count)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user