demo changes done

This commit is contained in:
Surendiran 2023-05-27 17:36:57 +05:30
commit fc3c328574
12 changed files with 115 additions and 46 deletions

View File

@ -590,15 +590,15 @@
</span>
</div>
<div class="booking-url">
<p class="booking-para">Here's your personal booking page. Edit and share this link with customers so they can book your Services directly.</p>
<span class="underline-title full-width">Appoinment booking domain</span>
<p class="booking-para">Here's your personal booking page. share this link with customers so they can book your Services directly.</p>
<span class="underline-title full-width">Appointment booking URL</span>
</div>
<div class="boxmiddle fl boxsize mt20">
<div class="booking-urls">
<div class="url-generate mb20">
<div class="url-link dis-flex">
<span class="url field-center boxsize">
<input type="text" placeholder=" {{endUserURL}}" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view">
<input type="text" placeholder=" {{endUserURL}}" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view" readonly>
</span>
<!-- <span id="zb-mb-BookingPageUrlCustomize" class="customize-link field-center cp ml10 mt0 mr10" data-ember-action="" data-ember-action-813="813">Customize</span> -->
<span class="url-button field-center boxsize pb1" *ngIf="copiedKey == 0"><button (click)="copyToClipBoard(endUserURL)" class="copy-button boxsize cp">Copy</button></span>

View File

@ -43,7 +43,7 @@ export class ConsultantSettingComponent implements OnInit {
"qualification":null,
"days": null,
"languages": null,
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
// "dob": null,
// "designtion": null,
"gender": null,
@ -238,7 +238,7 @@ unavailability(action,obj) {
"qualification":null,
"days": null,
"languages": null,
"workingHours": JSON.stringify( [{"sunday":{"hours":[],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[],"breaks":[]}},{"wednesday":{"hours":[],"breaks":[]}},{"thursday":{"hours":[],"breaks":[]}},{"friday":{"hours":[],"breaks":[]}},{"saturday":{"hours":[],"breaks":[]}}]),
"workingHours": JSON.stringify( [{"sunday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
// "dob": null,
// "designtion": null,
"gender": null,
@ -249,7 +249,7 @@ unavailability(action,obj) {
}]
let param;
let tmp = [{"sunday":{"hours":[],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[],"breaks":[]}},{"wednesday":{"hours":[],"breaks":[]}},{"thursday":{"hours":[],"breaks":[]}},{"friday":{"hours":[],"breaks":[]}},{"saturday":{"hours":[],"breaks":[]}}]
let tmp = [{"sunday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"09:00 pm","day":"saturday","value":null}],"breaks":[]}}]
param ={practitionerId: this.usersList.id,workingHours:JSON.stringify(tmp),days:7}
this._api.createPractitionerInfo(param).subscribe(res => {

View File

@ -1,17 +1,25 @@
<h3>Services Details</h3>
<mat-form-field style="width:30%">
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
</mat-form-field>
<mat-form-field appearance="outline" style="width:20%;margin-left: 5%;" *ngIf="user_role == 'FRONTDESK'">
<mat-label>Practitioner</mat-label>
<mat-select placeholder="Select Practitioner" [(ngModel)]="selectPractitioner" required>
<mat-option value="All" (click)="allPractitioner()">All</mat-option>
<mat-option *ngFor="let details of consultants" (click)="getPractitioner(details)" [value]="details.id">
{{details.userName}}
</mat-option>
</mat-select>
</mat-form-field>
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="start center" >
<mat-form-field style="width:60%">
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="end center" >
<mat-form-field appearance="outline" style="width:40%;margin-left: 5%;" *ngIf="user_role == 'FRONTDESK'">
<mat-label>Practitioner</mat-label>
<mat-select placeholder="Select Practitioner" [(ngModel)]="selectPractitioner" >
<mat-option value="All" (click)="allPractitioner()">All</mat-option>
<mat-option *ngFor="let details of consultants" (click)="getPractitioner(details)" [value]="details.id">
{{details.userName}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<button mat-button *ngIf="user_role != 'FRONTDESK'" (click)="openDialog('Add',{})" class="button">Add Services</button>
<!-- <div class="example-container mat-elevation-z8 "> -->
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">

View File

@ -71,6 +71,18 @@ export class ServiceListComponent implements OnInit {
if (res.status == 200) {
console.log(res.data)
this.consultants = res.data;
let tmp =[]
res.data.forEach(element => {
if(element.role == "PRACTITIONER"){
tmp.push(element)
}
});
this.consultants = tmp;
}
else{
this.consultants=[];
@ -104,16 +116,17 @@ export class ServiceListComponent implements OnInit {
this.servicesList.sort((a: any, b: any) => {
return b.serviceId - a.serviceId;
});
this.servicesList.forEach((element, index) => {
element.index = index
});
let result = this.servicesList.filter((obj, index, self) =>
index === self.findIndex((t) => (
t.serviceId === obj.serviceId
))
);
result.forEach((element, index) => {
element.index = index
});
this.servicesList = result
this.servicesListSource['data'] = this.servicesList;
this.servicesListLength = this.servicesList.length

View File

@ -357,7 +357,7 @@ export class UserListComponent implements OnInit {
}
let loginUser = localStorage.getItem('user_role')
if(loginUser == 'FRONTDESK'){
if(loginUser == "BIZADMIN"){
if(result.role == 'PRACTITIONER'){
console.log('PRACTITIONER')
if(action == 'Update'){
@ -368,7 +368,7 @@ export class UserListComponent implements OnInit {
this.openAssignService(res['data'].id,'',res['data'].userName)
}
}
}
}
}
else{

View File

@ -85,6 +85,9 @@ export class BookingSummaryComponent implements OnInit {
"appoinmentDate": slot_array[0].date,
"appoinmentTime": time,
"serviceMap": serviceMap,
"paymentStatus": 1,
"paymentMode":"online",
"createdBy":"customer",
"appoinmentSlots": JSON.stringify(slot_array[0].slots)
//"servicemap" :this.bookedAppointment_servicemap
}

View File

@ -114,35 +114,50 @@
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Name" type="text" name="name" formControlName="name" >
<mat-error *ngIf="myError('name', 'required')">Name is required</mat-error>
<mat-error *ngIf="myError('name', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Email" type="text" name="email" formControlName="email" >
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
Please enter a valid email address
</mat-error>
<!-- <mat-error *ngIf="myError('email', 'required')">email is required</mat-error> -->
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
Email is required
</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Phone No" type="text" name="phone" formControlName="phone" >
<!-- <input matInput placeholder="Phone No" type="text" name="phone" formControlName="phone" > -->
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" name="phone" formControlName="phone" [readonly]="noChangeNo == '1'" required>
<mat-error *ngIf="myError('phone', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phone', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phone', 'minlength')"> Contact No must be at least 10 characters</mat-error>
<mat-error *ngIf="myError('phone', 'maxlength')">Limit exceed</mat-error>
<div matSuffix *ngIf="verifyOTP != '1'">
<button mat-raised-button type="button" (click)="getOTP(1)" [disabled]="myError('phone', 'minlength') || myError('phone', 'required')" color="primary" class="mr-1 mb-1">Get OTP</button>
</div>
<span matSuffix *ngIf="verifyOTP == '1'"><mat-icon style="color: #4CAF50;">verified</mat-icon></span>
</mat-form-field>
</div>
<div id="sign-in-button"></div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Address" type="text" name="address_line_1" formControlName="address_line_1" >
<mat-error *ngIf="myError('address_line_1', 'required')">Address is required</mat-error>
</mat-form-field>
</div>
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center"> -->
<mat-form-field style="width: 80%;display:none;">
<input matInput placeholder="address_line_2" type="text" name="address_line_2" formControlName="address_line_2" >
</mat-form-field>
<!-- </div> -->
@ -193,21 +208,21 @@
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="State" type="text" name="state" formControlName="state" >
<mat-error *ngIf="myError('state', 'required')">state is required</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="City" type="text" name="city" formControlName="city" >
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Pincode" type="text" name="zip_code" formControlName="zip_code" >
<mat-error *ngIf="myError('zip_code', 'required')">Pincode is required</mat-error>
</mat-form-field>
</div>
@ -263,7 +278,7 @@
</div>
</div>
<div style="text-align: end;" >
<button class="mat-green" type="button" (click)="onclickfun()" mat-raised-button>Submit</button>
<button class="mat-green" type="button" [disabled]="form.invalid" (click)="onclickfun()" mat-raised-button>Submit</button>
</div>
</form>
</mat-card>

View File

@ -159,4 +159,11 @@ footer {
width: 100%;
position: absolute;
bottom: 0;
}
.mat-green:disabled {
/* Styles for the button when it's disabled */
background-color: gray !important; /* Change the background color to gray */
color: white !important; /* Change the text color to white */
/* Add any other styling as desired */
}

View File

@ -71,9 +71,11 @@ export class CustomerInfoComponent implements OnInit {
hash:new FormControl('', []),
amount: new FormControl('', []),
name: new FormControl('', [Validators.required]),
email: new FormControl('', [Validators.required]),
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]),
phone: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
address_line_1: new FormControl('', [Validators.required]),
address_line_1: new FormControl('', [Validators.required,Validators.maxLength(100)]),
address_line_2:new FormControl('', []),
order_id: new FormControl('', []),
description: new FormControl('', []),
@ -81,9 +83,9 @@ export class CustomerInfoComponent implements OnInit {
return_url: new FormControl('', []),
currency: new FormControl('', []),
country: new FormControl('', []),
zip_code: new FormControl('', []),
state: new FormControl('', []),
city: new FormControl('', []),
zip_code: new FormControl('', [Validators.required]),
state: new FormControl('', [Validators.required]),
city: new FormControl('', [Validators.required]),
udf1: new FormControl('', []),
udf2: new FormControl('', []),
udf3: new FormControl('', []),
@ -279,7 +281,7 @@ export class CustomerInfoComponent implements OnInit {
getOTP(event) {
this.phoneNumber = this.form.value.phoneNo
this.phoneNumber = this.form.value.phone
if( this.phoneNumber.length!=10){
alert("invalid Phone No...!")
}else{
@ -341,6 +343,8 @@ export class CustomerInfoComponent implements OnInit {
onclickfun(){
console.log("worked")
let row_obj = this.form.value
function generateRandomString() {
@ -348,6 +352,15 @@ export class CustomerInfoComponent implements OnInit {
const randomNum = (Math.random() + 1).toString(36).substring(7);
return prefix + randomNum;
}
if(this.verifyOTP == 0){
this.getOTP(1)
}
if(!this.form.valid ){
return
}else {
if(this.verifyOTP == 1){
let payment = {
api_key: "4cb964d4-9ef4-4a25-8f85-a2a13f43cbba",
hash: '',
@ -427,5 +440,9 @@ this.paymentform = payment;
)
//
}
}
}
}

View File

@ -48,7 +48,6 @@ export class DoctorProfileComponent implements OnInit {
console.log('booked', res);
if(res.length>0){
localStorage.setItem('busId',res[0].business[0].busId)
localStorage.setItem('busName',res[0].business[0].busName)
localStorage.setItem('logo',res[0].business[0].logo)
this.bookedAppointment = res[0].user[0]
@ -58,6 +57,10 @@ export class DoctorProfileComponent implements OnInit {
this.profileDetails = this.bookedAppointment.practitionerInfos[0]
console.log(this.profileDetails)
this.skillsDetails = JSON.parse(this.profileDetails.skills)
this.busName = res[0].business[0].busName
this.currency = localStorage.getItem('currency')
this.logo = res[0].business[0].logo
// this.skillsDetails = JSON.parse(this.skillsDetails)
}else{
@ -147,6 +150,9 @@ export class DoctorProfileComponent implements OnInit {
// console.log(filter)
localStorage.setItem('workingHrs',this.consultants[0].practitionerInfos
[0].workingHours)
localStorage.setItem('busName',this.ServicesMapDetailsList[0].business[0].busName)
localStorage.setItem('logo',this.ServicesMapDetailsList[0].business[0].logo)
this.end_user.appointmentBooked.next(this.ServicesMapDetailsList)
this.bookedAppointment = this.ServicesMapDetailsList[0].user[0]

View File

@ -30,7 +30,7 @@ const HORIZONTALMENUITEMS = [
},
{
state: 'appointments',
name: 'Appoinments',
name: 'Appointments',
type: 'link',
icon: 'developer_board',
// children: [

View File

@ -42,7 +42,7 @@ const MENUITEMS : Menu[] = [
},
{
state: 'appointments',
name: 'Appoinments',
name: 'Appointments',
type: 'link',
icon: 'calendar_today',
key: '1'