Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
5ec3ee5299
@ -1,4 +1,4 @@
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<ng-scrollbar class="scrollHV" *ngIf="user_role != 'PRACTITIONER'">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||
<mat-card class="mat_height" style="background:#3abba3;color: #fff;">
|
||||
@ -389,4 +389,75 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</div> -->
|
||||
</ng-scrollbar>
|
||||
|
||||
</ng-scrollbar>
|
||||
<!-- <ng-scrollbar class="scrollHV" *ngIf="user_role == 'PRACTITIONER'"> -->
|
||||
<section *ngIf="user_role == 'PRACTITIONER'" >
|
||||
<h3>Appointments</h3>
|
||||
|
||||
<div class="services-grid">
|
||||
|
||||
<div class="service service2">
|
||||
<h4>Today</h4>
|
||||
<ng-scrollbar class="scrollHV service" *ngIf="user_role == 'PRACTITIONER'">
|
||||
<mat-card *ngFor="let appoinment of appoinmentsListToday; index as i;">
|
||||
|
||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
||||
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
||||
</div>
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: end;margin-right: 7px">{{appoinment.status}}</div>
|
||||
<div style="text-align: start;margin-right: 7px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
</ng-scrollbar>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="service service2">
|
||||
<h4>Tomorrow</h4>
|
||||
<ng-scrollbar class="scrollHV service" >
|
||||
<mat-card *ngFor="let appoinment of appoinmentsListTomorrow; index as i;">
|
||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
||||
</div>
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: end;margin-right: 7px">{{appoinment.status}}</div>
|
||||
<div style="text-align: start;margin-right: 7px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
</ng-scrollbar>
|
||||
</div>
|
||||
|
||||
<div class="service service2">
|
||||
|
||||
<h4>Later</h4>
|
||||
<ng-scrollbar class="scrollHV service">
|
||||
<mat-card *ngFor="let appoinment of appoinmentsListLater; index as i;">
|
||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
||||
</div>
|
||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<div style="text-align: end;margin-right: 3px">{{appoinment.status}}</div>
|
||||
<div style="text-align: start;"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
</ng-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- </ng-scrollbar> -->
|
||||
@ -589,4 +589,186 @@ mat-icon{
|
||||
}
|
||||
::ng-deep .md-drppicker.double {
|
||||
width: 640px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@import url('https://fonts.googleapis.com/css?family=Montserrat:600|Open+Sans');
|
||||
|
||||
*, *:before, *:after {
|
||||
-webkit-box-sizing: inherit;
|
||||
-moz-box-sizing: inherit;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
margin: 1rem 0;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8125rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.9rem;
|
||||
margin: 1rem 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
section {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
font-size: 1.825rem;
|
||||
margin: 1.3rem 0;
|
||||
}
|
||||
|
||||
.section-lead {
|
||||
max-width: 600px;
|
||||
margin: 1rem auto 1.5rem;
|
||||
}
|
||||
|
||||
.service a {
|
||||
color: #5b7abb;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.service h4 {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 600;
|
||||
color: #56ceba;
|
||||
font-size: 1.3rem;
|
||||
margin: 1rem 0 0.6rem;
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.service {
|
||||
background: #f1f1f1;
|
||||
margin: 10px;
|
||||
// padding: 20px;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
border: 2px solid #e7e7e7;
|
||||
-webkit-transition: all 0.3s ease;
|
||||
-moz-transition: all 0.3s ease;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.service:hover {
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.service i {
|
||||
font-size: 3.45rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.service1 i,
|
||||
.service1 h4,
|
||||
.service1 .cta {
|
||||
color: #42b7ca;
|
||||
}
|
||||
|
||||
.service1:hover {
|
||||
border: 2px solid #42b7ca;
|
||||
}
|
||||
|
||||
.service2 i,
|
||||
.service2 h4,
|
||||
.service2 .cta {
|
||||
color: #425fca;
|
||||
}
|
||||
|
||||
.service2:hover {
|
||||
border: 2px solid #425fca;
|
||||
}
|
||||
|
||||
.service3 i,
|
||||
.service3 h4,
|
||||
.service3 .cta {
|
||||
color: #9c42ca;
|
||||
}
|
||||
|
||||
.service3:hover {
|
||||
border: 2px solid #9c42ca;
|
||||
}
|
||||
|
||||
.service .cta span {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.service > * {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.service .cta {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
@media all and (max-width:900px) {
|
||||
.services-grid {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.contct-img {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--color-divider);
|
||||
background-color: var(--default-bg-color);
|
||||
}
|
||||
|
||||
.teammember{
|
||||
margin: 0px 10px;
|
||||
padding: 12px 10px;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
section mat-card{
|
||||
background: linear-gradient(58deg, #009688, #673ab7);
|
||||
color: #fff;
|
||||
border-radius: 4px 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import * as moment from 'moment';
|
||||
import { CurrencyPipe, DatePipe } from '@angular/common';
|
||||
import { AppointmentsService } from 'app/appoinment/appoinments/appointments-service/appointments.service';
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
@ -13,7 +14,7 @@ import { CurrencyPipe, DatePipe } from '@angular/common';
|
||||
})
|
||||
export class DashboardComponent {
|
||||
private currencyPipe1:CurrencyPipe
|
||||
|
||||
|
||||
public single: any[];
|
||||
public multi: any[];
|
||||
public showXAxis = true;
|
||||
@ -332,7 +333,12 @@ messages: Object[] = [{
|
||||
currencyHtmlCode: any;
|
||||
startof30days: any;
|
||||
|
||||
constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
||||
appoinmentsList:any =[];
|
||||
appointmentListLength:any =[]
|
||||
appoinmentsListToday:any=[];
|
||||
appoinmentsListTomorrow:any =[];
|
||||
appoinmentsListLater:any =[];
|
||||
constructor(public _app:AppointmentsService,private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
||||
// this.fetch((data) => { this.rows = data; });
|
||||
Object.assign(this, {single, multi})
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
@ -355,6 +361,7 @@ messages: Object[] = [{
|
||||
let user_role = localStorage.getItem('user_role')
|
||||
let param
|
||||
if(user_role == 'PRACTITIONER'){
|
||||
this.getAppoinmentsList()
|
||||
param = {'user_id':localStorage.getItem('user_id'),'busId':localStorage.getItem('busId')}
|
||||
}else{
|
||||
param = {'busId':localStorage.getItem('busId')}
|
||||
@ -672,4 +679,61 @@ messages: Object[] = [{
|
||||
|
||||
return spanElement.innerHTML;
|
||||
}
|
||||
|
||||
|
||||
getAppoinmentsList() {
|
||||
this.appoinmentsList=[]
|
||||
let user_role = localStorage.getItem('user_role');
|
||||
let param = {"busId": localStorage.getItem('busId'),"userId":localStorage.getItem('user_id')}
|
||||
console.log(param)
|
||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||
|
||||
if (res.status == 200) {
|
||||
|
||||
this.appoinmentsList = res.data;
|
||||
this.appoinmentsList.forEach(element => {
|
||||
console.log(element)
|
||||
element.appoinmentSlots = JSON.parse(element.appoinmentSlots)
|
||||
});
|
||||
var startDate:any = new Date();
|
||||
startDate = startDate.toISOString().slice(0, 10);
|
||||
this.appoinmentsList.forEach(element => {
|
||||
|
||||
if(element.appoinmentDate == startDate){
|
||||
this.appoinmentsListToday.push(element)
|
||||
}
|
||||
|
||||
});
|
||||
// this.appoinmentsListToday = this.appoinmentsList.filter(val => val.appoinmentDate == startDate )
|
||||
// this.appoinmentsList = appoinmentsListToday
|
||||
localStorage.setItem('busId', res.data[0].busId
|
||||
)
|
||||
var startDate1:any = new Date();
|
||||
startDate1.setDate(startDate1.getDate() + 1);
|
||||
let Tomorrow = startDate1.toISOString().slice(0, 10)
|
||||
console.log(Tomorrow)
|
||||
this.appoinmentsList.forEach(element => {
|
||||
|
||||
if(element.appoinmentDate == Tomorrow){
|
||||
this.appoinmentsListTomorrow.push(element)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.appoinmentsList.forEach(element => {
|
||||
|
||||
if(element.appoinmentDate != Tomorrow && element.appoinmentDate != startDate ){
|
||||
this.appoinmentsListLater.push(element)
|
||||
}
|
||||
|
||||
});
|
||||
console.log(this.appoinmentsListLater)
|
||||
|
||||
// this.appoinmentsListTomorrow= this.appoinmentsList.filter(val => val.appoinmentDate == Yesterday )
|
||||
this.appointmentListLength = res.data.length;
|
||||
console.log(this.appointmentListLength)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
<span class="head">Fees</span>
|
||||
</div>
|
||||
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
||||
<span>: {{busCurrency}} {{(serviceMapDetails.duration.length>0 ? serviceMapDetails.duration[0].fees : serviceMapDetails.service[0].fees) | currency: currency:true:'2.0'}}</span>
|
||||
<span>: {{(serviceMapDetails.duration.length>0 ? serviceMapDetails.duration[0].fees : serviceMapDetails.service[0].fees) | currency: busCurrency}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
<span class="head">Payment Status</span>
|
||||
</div>
|
||||
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
||||
<span [ngStyle]="{ 'color': bookingSummary.paymentStatus== 0 ? 'red':'green' }">: {{(bookingSummary.paymentStatus== 0 ? 'Not Paid' : 'Paid') }}</span>
|
||||
<span [ngStyle]="{ 'color': bookingSummary.paymentStatus== 1 ? 'red':'green' }">: {{(bookingSummary.paymentStatus== 1 ? 'Not Paid' : 'Paid') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div fxLayout="row wrap" style="margin-bottom: 20px;">
|
||||
|
||||
@ -72,15 +72,15 @@ export class BookingSummaryComponent implements OnInit {
|
||||
console.log(URL,slot_array)
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
let cusID;
|
||||
let appointmentId;
|
||||
if(URL_AS_LIST[2] == 'business'){
|
||||
cusID=URL_AS_LIST[9]
|
||||
appointmentId=URL_AS_LIST[9]
|
||||
}else{
|
||||
cusID=URL_AS_LIST[8]
|
||||
appointmentId=URL_AS_LIST[8]
|
||||
}
|
||||
// if(serviceDetails.hasOwnProperty('userId')){
|
||||
serviceDetails.userId = localStorage.getItem('user_id')
|
||||
let paramPay = {"cusId":cusID}
|
||||
let userId = localStorage.getItem('user_id')
|
||||
let paramPay = {"appointmentId":appointmentId , "userId":userId}
|
||||
this.end_user.paymentstatus(paramPay).subscribe(resPay => {
|
||||
|
||||
|
||||
@ -90,25 +90,26 @@ export class BookingSummaryComponent implements OnInit {
|
||||
|
||||
|
||||
// }
|
||||
let paramsmap= {
|
||||
"serviceId": ""+serviceDetails.serviceId+"",
|
||||
"userId": serviceDetails.userId,
|
||||
"busId": serviceDetails.busId
|
||||
}
|
||||
console.log(paramsmap)
|
||||
this.end_user.CreatecusServicesMapDetails(paramsmap).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let serviceMap = res['data'][0].id
|
||||
let time = new Date().toLocaleTimeString()
|
||||
let param= {
|
||||
"busId": serviceDetails.busId,
|
||||
"cusId": cusID,
|
||||
"appoinmentDate": slot_array[0].date,
|
||||
"userId": serviceDetails.userId,
|
||||
"appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
||||
//"servicemap" :this.bookedAppointment_servicemap
|
||||
}
|
||||
// let paramsmap= {
|
||||
// "serviceId": ""+serviceDetails.serviceId+"",
|
||||
// "userId": serviceDetails.userId,
|
||||
// "busId": serviceDetails.busId
|
||||
// }
|
||||
// console.log(paramsmap)
|
||||
// this.end_user.CreatecusServicesMapDetails(paramsmap).subscribe(res => {
|
||||
// if (res.status == 200) {
|
||||
// console.log(res)
|
||||
// let serviceMap = res['data'][0].id
|
||||
// let time = new Date().toLocaleTimeString()
|
||||
// let param= {
|
||||
// "busId": serviceDetails.busId,
|
||||
// "cusId": cusID,
|
||||
// "appoinmentDate": slot_array[0].date,
|
||||
// "userId": serviceDetails.userId,
|
||||
// "appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
||||
// //"servicemap" :this.bookedAppointment_servicemap
|
||||
// }
|
||||
let param =paramPay
|
||||
console.log(param)
|
||||
|
||||
this.end_user.CheckAppoinmentsDetails(param).subscribe(res => {
|
||||
@ -188,8 +189,8 @@ export class BookingSummaryComponent implements OnInit {
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
})
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -612,7 +612,7 @@ this._cus.paymentRequest(this.form.value ).subscribe(res => {
|
||||
// let URL = this.router.url;
|
||||
// console.log(URL)
|
||||
this.form.controls['hash'].setValue(res.data)
|
||||
this.testFormEl.nativeElement.submit()
|
||||
this.testFormEl.nativeElement.submit()
|
||||
|
||||
})
|
||||
|
||||
|
||||
@ -96,6 +96,7 @@ const routes: Routes = [{
|
||||
path: 'practitioner/:randstr/services/slots/list/cus/:cusId/pt',
|
||||
component: PaymentComponent
|
||||
},
|
||||
|
||||
{
|
||||
path: 'practitioner/:randstr/services/slots/list/cus/:cusId/pt/bts',
|
||||
component: BookingSummaryComponent
|
||||
|
||||
Loading…
Reference in New Issue
Block a user