Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend

This commit is contained in:
Smart 2023-04-18 12:27:36 +05:30
commit e8a1e66401
35 changed files with 419 additions and 126 deletions

View File

@ -23,11 +23,11 @@
</mat-form-field>
<mat-form-field appearance="outline" class="card-mat-pane">
<mat-label>Phone</mat-label>
<input placeholder=" Phone" matInput formControlName="phoneNo">
<!-- <mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<input placeholder=" Phone" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput formControlName="phoneNo">
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error> -->
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div class="popup-button">

View File

@ -17,11 +17,14 @@ export class AppointmentAddcustomerComponent implements OnInit {
this.form = new FormGroup({
name: new FormControl('', [Validators.required]),
email: new FormControl('', [Validators.required]),
phoneNo: new FormControl('', [Validators.required]),
phoneNo: new FormControl('', [Validators.required,Validators.minLength(10),Validators.maxLength(10)]),
});
}
public myError = (controlName: string, errorName: string) =>{
return this.form.controls[controlName].hasError(errorName);
}
save(){
}

View File

@ -25,7 +25,7 @@
</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
<input type="number" placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
<input type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
@ -59,7 +59,7 @@
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
<input type='file'accept="image/*" data-max-size="2048" style="width: 50%;" (change)="onSelectFile($event)" formControlName="logo"><br>
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg anf png)</span>
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
</div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" fxLayoutAlign="start end">
<mat-checkbox *ngIf="action != 'Update'" class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>

View File

@ -97,7 +97,7 @@ export class AddBusinessComponent implements OnInit {
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]),
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10),Validators.pattern('^[0-9]{10}$')]),
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
createdBy:new FormControl(userrole,[Validators.required]),
});
@ -107,7 +107,7 @@ export class AddBusinessComponent implements OnInit {
public myError = (controlName: string, errorName: string) =>{
return this.form.controls[controlName].hasError(errorName);
}
submit(){
let tmp = this.form.value
tmp.id = this.local_data.id

View File

@ -56,8 +56,8 @@ const customNotifierOptions: NotifierOptions = {
@NgModule({
declarations: [
BusinessListComponent,
AddBusinessComponent
AddBusinessComponent,
],
imports: [
DemoMaterialModule,

View File

@ -14,8 +14,11 @@ export class AssignServiceComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<AssignServiceComponent>,@Optional() @Inject(MAT_DIALOG_DATA) public data) {
console.log(data)
this.local_data = data
this.local_data.duration = this.local_data.durationNew
if(this.local_data.hasOwnProperty('durationNew')){
this.local_data.duration = this.local_data.durationNew
}
}
ngOnInit(): void {

View File

@ -433,7 +433,7 @@
</div>
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70">
<div class="service-info">{{details.servicesName}}</div>
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : 0}}</span></div>
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees}}</span></div>
<div class="info" (click)="asignService(details,i)">+ Customize the price and duration of a service.</div>
</div>
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15" fxLayoutAlign="center center">

View File

@ -194,7 +194,13 @@ unavailability(action,obj) {
console.log( this.practitionerdetails)
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
console.log(this.practitionerdetails)
this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr
if(this.userRole == 'PRACTITIONER'){
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr
} else if (this.userRole == 'BADMIN'){
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
}
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
this.skills= JSON.parse(this.practitionerdetails.skills)
this.id=this.practitionerdetails.id
@ -356,7 +362,7 @@ unavailability(action,obj) {
save(){
this.isEditable = false;
let userid = localStorage.getItem('user_id')
let param: any = { "exp": this.exp,
let param: any = { "exp": this.exp,
// "id": this.id,
"qualification": this.qualification,
"fees": "800",
@ -366,7 +372,7 @@ unavailability(action,obj) {
"gender": this.gender,
"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":[]}}]),
"description": this.description,
"skills": this.skills,
"skills": JSON.stringify(this.skills),
"caption": this.caption,
"userName": this.userName,
"practitionerId":userid

View File

@ -173,12 +173,13 @@ export class EditWorkingHoursComponent implements OnInit {
let sunday ={filters :this.data[0].sunday.hours }
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
this.addFilterToFiltersFormArray()
this.dynamicForm.patchValue(sunday)
}
// if(this.data[0].sunday.hours.length>1){
// }
this.dynamicForm.patchValue(sunday)
// this.data[1].monday.hours.forEach(element => {
// element.value = null

View File

@ -23,7 +23,7 @@
</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
<input placeholder=" Phone" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
<input placeholder=" Phone" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>

View File

@ -52,15 +52,15 @@ export class AddCustomersComponent implements OnInit {
this.form = new FormGroup({
// businessselect: new FormControl('', [Validators.required]),
// image: new FormControl('', null),
cusName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
address_1: new FormControl('', [Validators.required, Validators.maxLength(50)]),
city: new FormControl('', [Validators.required, Validators.maxLength(10)]),
state: new FormControl('', [Validators.required, Validators.maxLength(10)]),
pincode: new FormControl('', [Validators.required, Validators.maxLength(10)]),
cusName: new FormControl('', [Validators.required]),
address_1: new FormControl('', [Validators.required, Validators.maxLength(100)]),
city: new FormControl('', [Validators.required]),
state: new FormControl('', [Validators.required]),
pincode: new FormControl('', [Validators.required, Validators.maxLength(6)]),
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]),
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
});
this.form.patchValue(this.local_data)

View File

@ -87,7 +87,7 @@ export class CustomersListComponent implements OnInit {
this._app.getAppoinmentsListDetails(param).subscribe(res => {
if (res.status == 200) {
this.appoinmentsList = res.data;
this.recordStatus=true;
// this.recordStatus=true;
let id = localStorage.getItem('user_id')
console.log(id)
console.log(this.appoinmentsList)

View File

@ -38,11 +38,13 @@ closeDialog(){
ngOnInit() {
this.form = new FormGroup({
servicesName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
servicesName: new FormControl('', [Validators.required]),
duration: new FormControl('',[Validators.required]),
description: new FormControl('',[Validators.required]),
fees:new FormControl('',[Validators.required])
});
console.log(this.local_data)
this.local_data.duration = JSON.stringify(this.local_data.duration)
this.form.patchValue(this.local_data)
}

View File

@ -32,7 +32,7 @@
<!-- Description Column -->
<ng-container matColumnDef="duration">
<mat-header-cell *matHeaderCellDef mat-sort-header> Duration </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.duration}} </mat-cell>
<mat-cell *matCellDef="let row"> {{row.duration}} Mins</mat-cell>
</ng-container>
<ng-container matColumnDef="fees">
<mat-header-cell *matHeaderCellDef mat-sort-header> Fees </mat-header-cell>

View File

@ -20,8 +20,7 @@
{{business.busName}}
</mat-option>
</mat-select>
<mat-error *ngIf="myError('businessselect', 'required')">business is required</mat-error>
<mat-error *ngIf="myError('businessselect', 'required')">business is required</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
<mat-label>Role</mat-label>
@ -31,7 +30,7 @@
{{roleNmae.name}}
</mat-option>
</mat-select>
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
<mat-error *ngIf="myError('role', 'required')">role is required</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
@ -52,7 +51,7 @@
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
<mat-label>Phone No</mat-label>
<input matInput type="number" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
@ -80,7 +79,7 @@
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
<input type='file'accept="image/*" data-max-size="2048" style="width: 33%;" (change)="onSelectFile($event)" formControlName="logo"><br>
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg anf png)</span>
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>

View File

@ -53,7 +53,7 @@ export class AddUserComponent implements OnInit {
role: new FormControl('', [Validators.required]),
userName: new FormControl('', [Validators.required]),
// contactNo: new FormControl('', [Validators.required, Validators.maxLength(20)]),
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
// lastName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
@ -74,6 +74,7 @@ export class AddUserComponent implements OnInit {
this.form.patchValue(this.local_data)
}, 500);
}
public myError = (controlName: string, errorName: string) =>{
return this.form.controls[controlName].hasError(errorName);
}
@ -157,7 +158,7 @@ export class AddUserComponent implements OnInit {
}
let tmp = this.form.value
tmp.id = this.local_data.id
console.log(this.formData.getAll('image'));
console.log(tmp,this.formData.getAll('image'));
if(this.busId == null){
this.busId = localStorage.getItem('busNameID') || null
}

View File

@ -76,24 +76,31 @@ export class UserListComponent implements OnInit {
this.getBusinessList()
}
getUsersList() {
//this._pd.getTabStatusPdDetails(this.tabStatus)
this._use.getUsersListDetails().subscribe(res => {
if (res.status == 200) {
this.isLoading = false
let usersList = res.data
usersList.sort((a: any, b: any) => {
return b.id - a.id;
});
this.usersList['data'] = usersList;
this.usersListLength = res.data.length;
this.recordStatus=false;
}
else{
// this.usersList=[];
// this.dataSource = null;
this.recordStatus=true;
}
},error => this.isLoading = false);
let userRole = localStorage.getItem('user_role')
let param;
if(userRole == 'BADMIN'){
param ={"busId": localStorage.getItem('busId')}
}else {
param = {}
}
this._use.getUsersListDetails(param).subscribe(res => {
if (res.status == 200) {
this.isLoading = false
let usersList = res.data
usersList.sort((a: any, b: any) => {
return b.id - a.id;
});
this.usersList['data'] = usersList;
this.usersListLength = res.data.length;
this.recordStatus=false;
}
else{
// this.usersList=[];
// this.dataSource = null;
this.recordStatus=true;
}
},error => this.isLoading = false);
}
getBusinessList() {
//this._pd.getTabStatusPdDetails(this.tabStatus)

View File

@ -11,10 +11,17 @@ export class UserService {
private apiUrl = environment.apiEndpoint;
constructor(private _http: HttpClient) { }
getUsersListDetails(): Observable<any> {
getUsersListDetails2(): Observable<any> {
console.log('IN')
return this._http.get<any[]>(this.apiUrl + "getusers")
return this._http.post<any[]>(this.apiUrl + "getusers",{})
// .pipe(
// catchError(this.handleError('role', []))
// )
}
getUsersListDetails(param): Observable<any> {
console.log('IN')
return this._http.post<any[]>(this.apiUrl + "getusers",param)
// .pipe(
// catchError(this.handleError('role', []))
// )

View File

@ -53,7 +53,8 @@ const customNotifierOptions: NotifierOptions = {
@NgModule({
declarations: [
UserListComponent,
AddUserComponent
AddUserComponent,
],
imports: [
DemoMaterialModule,

View File

@ -20,14 +20,24 @@ export class ConsultantsListComponent implements OnInit {
busName:any=[]
private apiUrl = environment.apiEndpoint;
ServicesMapDetailsList: any=[];
constructor(private router:Router,public dialog: MatDialog,public end_user:EndUserService,private spinner:NgxSpinnerService) {
this.spinner.show();
}
ngOnInit(): void {
this.busName = localStorage.getItem('busName')
let tmp = localStorage.getItem('cusServiceData')
let tmp = localStorage.getItem('cusServiceData')
let URL = this.router.url;
console.log(URL);
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'business'){
let practitioner = JSON.parse(tmp)
console.log(practitioner)
let arr_val=[]
@ -87,7 +97,9 @@ export class ConsultantsListComponent implements OnInit {
});
console.log(workinghrs)
}else{
this.getpractitionerList()
}
}
random_ng_past()
{
@ -103,6 +115,11 @@ export class ConsultantsListComponent implements OnInit {
goToSlotBooking(param){
let URL = this.router.url;
console.log(URL,param)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'business'){
let tmp = localStorage.getItem('cusServiceData')
let practitioner = JSON.parse(tmp)
console.log(practitioner)
@ -122,10 +139,76 @@ export class ConsultantsListComponent implements OnInit {
// console.log(URL+"/"+data.randStr+"/practitioner")
// this.router.navigate([URL+"/slot"])
this.router.navigate([URL+"/details"])
}else{
console.log(URL,param,this.ServicesMapDetailsList)
let filter = this.ServicesMapDetailsList.filter(arr=>{return arr.userId == param.id && arr.busId ==param.busId})
console.log(filter)
localStorage.setItem('workingHrs',param.practitionerInfos
[0].workingHours)
this.end_user.appointmentBooked.next(filter)
this.router.navigate([URL+"/details"])
}
}
image_view(image){
return this.apiUrl+'imageViewer?img_name='+image;
}
getpractitionerList() {
let URL = this.router.url;
console.log(URL);
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
//this._pd.getTabStatusPdDetails(this.tabStatus)
let params = {
"randStr":URL_AS_LIST[3],
"queryName":URL_AS_LIST[2]
}
console.log(params);
this.end_user.getcusServicesMapDetails(params).subscribe(res => {
if (res.status == 200) {
console.log(res)
let tmp =[]
let arr_val =res['data'];
this.ServicesMapDetailsList = arr_val
arr_val.forEach(element => {
tmp.push(element.user[0] )
});
let filter = tmp.filter(arr=>{return arr.role == "PRACTITIONER"})
console.log(tmp,filter)
let result = filter.filter((obj, index, self) =>
index === self.findIndex((t) => (
t.id=== obj.id
))
);
this.consultants = result;
setTimeout(() => {
/** spinner ends after 5 seconds */
this.spinner.hide();
}, 1000);
console.log(this.consultants)
}
})
}
}

View File

@ -31,7 +31,7 @@
<div fxLayout="row">
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 100%">
<input matInput placeholder="Phone No" type="text" name="phone" formControlName="phoneNo" [readonly]="verifyOTP == '1'" required>
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" name="phone" formControlName="phoneNo" [readonly]="verifyOTP == '1'" required>
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>

View File

@ -44,12 +44,12 @@ export class CustomerInfoComponent implements OnInit {
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]),
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
address_1: new FormControl('', [ Validators.maxLength(50)]),
city: new FormControl('', [ Validators.maxLength(10)]),
state: new FormControl('', [ Validators.maxLength(10)]),
otp: new FormControl('', [ Validators.maxLength(10)]),
pincode: new FormControl('',[ Validators.maxLength(6)]),
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
address_1: new FormControl('', [ Validators.maxLength(100)]),
city: new FormControl(''),
state: new FormControl(''),
otp: new FormControl('', [ Validators.maxLength(6),Validators.minLength(6)]),
pincode: new FormControl(''),
});
}

View File

@ -58,8 +58,14 @@ export class DoctorProfileComponent implements OnInit {
let URL = this.router.url;
console.log(URL)
// this.router.navigate([URL+"/slot"])
this.router.navigate([URL+"/slot"])
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'business'){
this.router.navigate([URL+"/slot"])
}else{
this.router.navigate([URL+"/services"])
}
}
image_view(image){

View File

@ -49,6 +49,24 @@ const routes: Routes = [{
path: 'business/:randstr',
component: ServiceListComponent
},
{
path: 'practitioner/:randstr',
component: ConsultantsListComponent
},
{
path: 'practitioner/:randstr/details',
component: DoctorProfileComponent
},
{
path: 'practitioner/:randstr/details/services',
component: ServiceListComponent
},
{
path: 'practitioner/:randstr/details/services/slots/list',
component: SlotBookingDetailsComponent
},
{
path: 'business/:randstr/:randstrs/practitioner',
component: ConsultantsListComponent
@ -69,6 +87,19 @@ const routes: Routes = [{
path: 'business/:randstr/:randstrs/practitioner/details/slot/cus/:cusId/pt/bts',
component: BookingSummaryComponent
},
///
{
path: 'practitioner/:randstr/details/services/slots/list/cus',
component: CustomerInfoComponent
},
{
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt',
component: PaymentComponent
},
{
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt/bts',
component: BookingSummaryComponent
},
{
path: 'business/:randstr/:randstrs/practitioner/details',
component: DoctorProfileComponent

View File

@ -123,7 +123,7 @@ export class SearchCategoryComponent implements OnInit {
}
});
} else if(this.eventData == 'consultants'){
this._use.getUsersListDetails().subscribe(res => {
this._use.getUsersListDetails2().subscribe(res => {
if (res.status == 200) {
console.log(res)
// let data = res['data'].filter(val => val.role == 'PRACTITIONER')

View File

@ -209,6 +209,12 @@ let updatevalue = { serviceId: row_obj.serviceId,
}
goto(data){
let URL = this.router.url;
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'business'){
console.log(URL,data,this.full_data)
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
console.log(filter)
@ -216,6 +222,13 @@ let updatevalue = { serviceId: row_obj.serviceId,
localStorage.setItem("servicedetails",JSON.stringify(data))
console.log(URL+"/"+data.randStr+"/practitioner")
this.router.navigate([URL+"/"+data.randStr+"/practitioner"])
}else{
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
console.log(filter)
localStorage.setItem('cusServiceData',JSON.stringify(filter))
localStorage.setItem("servicedetails",JSON.stringify(data))
this.router.navigate([URL+"/slots/list"])
}
}

View File

@ -69,7 +69,7 @@
<p class="param"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner </p>
<span class="span-text">Dr. {{doctor}}</span>
<p class="param"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service </p>
<span class="span-text"> {{servicesName.servicesName}} ({{servicesName.duration
<span class="span-text"> {{servicesName.servicesName}} ({{serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].durationNew:serviceMapdetails[0].service[0].duration
}} Mins)</span>
<!-- <p class="text-color d-flex align-items-start" >
<img src="assets/images/information.svg" alt="Avatar" class="img" />
@ -81,7 +81,7 @@
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time : </p>
<span class="span-text">{{slotTime | date:'shortTime'}}</span>
<p class="param"><img src="assets/images/Location.svg" alt="Avatar" class="img">Amount : </p>
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">&#x20b9;</span> {{user.practitionerInfos[0].days}}</span>
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">&#x20b9;</span> {{ serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].fees:serviceMapdetails[0].service[0].fees}}</span>
</div>
</div>

View File

@ -275,7 +275,7 @@ footer {
}
.scrollHV {
height: calc(100vh - 150px);
//height: calc(100vh - 150px);
// zoom: 90%;
}

View File

@ -51,11 +51,14 @@ export class SlotBookingDetailsComponent implements OnInit {
doctor: any=[];
servicesName: any=[];
user: any=[];
serviceMapdetails:any =[]
constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
this.end_user.appointmentBooked_observable$.subscribe((res) => {
console.log('booked', res);
if(res.length>0){
this.serviceMapdetails =res
this.servicesName = res[0].service[0]
console.log(this.servicesName)
this.user = res[0].user[0]
this.doctor = res[0].user[0].userName
this.getApiData()
@ -106,8 +109,13 @@ export class SlotBookingDetailsComponent implements OnInit {
// console.log(key,value1)
// }
});
let getDuration = JSON.parse(localStorage.getItem('servicedetails'))
console.log(getDuration.duration)
let tmpdata = localStorage.getItem('servicedetails')
let getDuration;
if(tmpdata != null){
getDuration = JSON.parse(localStorage.getItem('servicedetails'))
console.log(getDuration.duration)
}
function convertTime12to24 (time12h) {
const [time, modifier] = time12h.split(' ');
@ -165,6 +173,7 @@ export class SlotBookingDetailsComponent implements OnInit {
// Output the intervals
console.log(intervals);
//this.slots = intervals
}
@ -177,6 +186,10 @@ export class SlotBookingDetailsComponent implements OnInit {
let service = localStorage.getItem("servicedetails")
let serviceDetails = JSON.parse(service)
console.log(serviceDetails)
this.servicesName = serviceDetails
this.serviceMapdetails = this.serviceMapdetails.filter(arr=>{return arr.serviceId == serviceDetails.serviceId })
console.log( this.serviceMapdetails)
// this.form.controls['note'].setValue('Sample')
this.form.patchValue(this.local_data)
}

View File

@ -188,7 +188,7 @@
</div>
</div>
</div>
<div class="vertical-menu w-100">
<div class="vertical-menu w-100 " style="margin: 1rem;" >
<!-- <button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
<mat-icon>menu</mat-icon>
</button> -->

View File

@ -21,10 +21,10 @@ export class RegisterComponent {
ngOnInit() {
this.form = new FormGroup({
bus_name: new FormControl('', [Validators.required, Validators.maxLength(20)]),
address: new FormControl('', [Validators.required, Validators.maxLength(50)]),
city: new FormControl('', [Validators.required, Validators.maxLength(10)]),
state: new FormControl('', [Validators.required, Validators.maxLength(10)]),
bus_name: new FormControl('', [Validators.required]),
address: new FormControl('', [Validators.required, Validators.maxLength(100)]),
city: new FormControl('', [Validators.required]),
state: 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}$',
),]),

View File

@ -41,58 +41,149 @@ import {PortalModule} from '@angular/cdk/portal';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCardModule } from '@angular/material/card';
import { FlexModule } from '@angular/flex-layout';
import { MobileNumberPatternDirective } from './mobile_number_pattern/mobile-number-pattern.directive';
/**
* NgModule that includes all Material modules that are required to serve the demo-app.
*/
const modules = [
MatCardModule,
MatAutocompleteModule,
MatButtonModule,
MatButtonToggleModule,
MatCheckboxModule,
MatChipsModule,
MatTableModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatFormFieldModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSlideToggleModule,
MatSliderModule,
MatSnackBarModule,
MatSortModule,
MatStepperModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatNativeDateModule,
CdkTableModule,
A11yModule,
BidiModule,
CdkAccordionModule,
ObserversModule,
OverlayModule,
PlatformModule,
PortalModule,
FlexModule,
FormsModule,
ReactiveFormsModule]
// const modules = [
// MatCardModule,
// MatAutocompleteModule,
// MatButtonModule,
// MatButtonToggleModule,
// MatCheckboxModule,
// MatChipsModule,
// MatTableModule,
// MatDatepickerModule,
// MatDialogModule,
// MatDividerModule,
// MatExpansionModule,
// MatFormFieldModule,
// MatGridListModule,
// MatIconModule,
// MatInputModule,
// MatListModule,
// MatMenuModule,
// MatPaginatorModule,
// MatProgressBarModule,
// MatProgressSpinnerModule,
// MatRadioModule,
// MatRippleModule,
// MatSelectModule,
// MatSidenavModule,
// MatSlideToggleModule,
// MatSliderModule,
// MatSnackBarModule,
// MatSortModule,
// MatStepperModule,
// MatTabsModule,
// MatToolbarModule,
// MatTooltipModule,
// MatNativeDateModule,
// CdkTableModule,
// A11yModule,
// BidiModule,
// CdkAccordionModule,
// ObserversModule,
// OverlayModule,
// PlatformModule,
// PortalModule,
// FlexModule,
// FormsModule,
// ReactiveFormsModule]
@NgModule({
imports: [...modules],
exports: [...modules]
declarations:[MobileNumberPatternDirective],
imports: [
MatCardModule,
MatAutocompleteModule,
MatButtonModule,
MatButtonToggleModule,
MatCheckboxModule,
MatChipsModule,
MatTableModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatFormFieldModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSlideToggleModule,
MatSliderModule,
MatSnackBarModule,
MatSortModule,
MatStepperModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatNativeDateModule,
CdkTableModule,
A11yModule,
BidiModule,
CdkAccordionModule,
ObserversModule,
OverlayModule,
PlatformModule,
PortalModule,
FlexModule,
FormsModule,
ReactiveFormsModule],
exports: [
MatCardModule,
MatAutocompleteModule,
MatButtonModule,
MatButtonToggleModule,
MatCheckboxModule,
MatChipsModule,
MatTableModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatFormFieldModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSlideToggleModule,
MatSliderModule,
MatSnackBarModule,
MatSortModule,
MatStepperModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatNativeDateModule,
CdkTableModule,
A11yModule,
BidiModule,
CdkAccordionModule,
ObserversModule,
OverlayModule,
PlatformModule,
PortalModule,
FlexModule,
FormsModule,
ReactiveFormsModule,
MobileNumberPatternDirective]
})
export class DemoMaterialModule {}

View File

@ -0,0 +1,8 @@
import { MobileNumberPatternDirective } from './mobile-number-pattern.directive';
describe('MobileNumberPatternDirective', () => {
it('should create an instance', () => {
const directive = new MobileNumberPatternDirective();
expect(directive).toBeTruthy();
});
});

View File

@ -0,0 +1,18 @@
import { Directive, ElementRef, HostListener } from '@angular/core';
@Directive({
selector: '[appMobileNumberPattern]'
})
export class MobileNumberPatternDirective {
constructor(private _el: ElementRef) { }
@HostListener('input', ['$event']) onInputChange(event) {
const initalValue = this._el.nativeElement.value;
this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');
if ( initalValue !== this._el.nativeElement.value) {
event.stopPropagation();
}
}
}

View File

@ -10,11 +10,11 @@ export const environment = {
// apiEndpoint:'http://192.168.1.20:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/',
// apiEndpoint:'http://venbainfotech.com:5000/api/',
apiEndpoint:'http://192.168.1.4:8080/api/',
apiEndpoint:'http://192.168.1.8:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/',
//EndUser URL
endUserUrl:'https://venbainfotech.com/appointment/#/customer/business/',
endUserUrl:'https://venbainfotech.com/appointment/#/customer/',
firebase: {
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",