diff --git a/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html b/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html index 84ed95f..092fd3c 100644 --- a/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html +++ b/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html @@ -23,11 +23,11 @@ Phone - - + Limit exceed
Add Admin diff --git a/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts b/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts index 19cd671..a0521c7 100644 --- a/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts +++ b/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts @@ -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 diff --git a/ng-seed/src/app/appoinment/business/business.module.ts b/ng-seed/src/app/appoinment/business/business.module.ts index e9b3af3..6404b91 100644 --- a/ng-seed/src/app/appoinment/business/business.module.ts +++ b/ng-seed/src/app/appoinment/business/business.module.ts @@ -56,8 +56,8 @@ const customNotifierOptions: NotifierOptions = { @NgModule({ declarations: [ BusinessListComponent, - AddBusinessComponent - + AddBusinessComponent, + ], imports: [ DemoMaterialModule, diff --git a/ng-seed/src/app/appoinment/consultant-setting/assign-service/assign-service.component.ts b/ng-seed/src/app/appoinment/consultant-setting/assign-service/assign-service.component.ts index 0eccf3f..4ad03e6 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/assign-service/assign-service.component.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/assign-service/assign-service.component.ts @@ -14,8 +14,11 @@ export class AssignServiceComponent implements OnInit { constructor(public dialogRef: MatDialogRef,@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 { diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html index 5b4f94e..9ef133e 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html @@ -433,7 +433,7 @@
{{details.servicesName}}
-
{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | {{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : 0}}
+
{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | {{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees}}
+ Customize the price and duration of a service.
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts index c3ec73c..acbac35 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts @@ -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 diff --git a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts index 723928e..8c1488e 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts @@ -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 diff --git a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html index 5205346..d4a0377 100644 --- a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html +++ b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html @@ -23,7 +23,7 @@ - + Contact No is required Invalid Contact No Contact No must be at least 10 characters diff --git a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts index 432507d..d87e84d 100644 --- a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts +++ b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts @@ -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) diff --git a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts index 80b4331..7281b1a 100644 --- a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts +++ b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts @@ -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) diff --git a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts index 6fc765b..bff7e21 100644 --- a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts +++ b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts @@ -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) } diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html index dcb60be..894843e 100644 --- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html +++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html @@ -32,7 +32,7 @@ Duration - {{row.duration}} + {{row.duration}} Mins Fees diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html index 408f220..3613825 100644 --- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html +++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html @@ -20,8 +20,7 @@ {{business.busName}} - business is required - + business is required Role @@ -31,7 +30,7 @@ {{roleNmae.name}} - role is required + role is required @@ -52,7 +51,7 @@ Phone No - + Contact No is required Invalid Contact No Contact No must be at least 10 characters @@ -80,7 +79,7 @@

- Upload Below 2MB
Supported File (jpg,jpeg anf png)
+ Upload Below 2MB
Supported File (jpg,jpeg and png)
diff --git a/ng-seed/src/app/session/register/register.component.ts b/ng-seed/src/app/session/register/register.component.ts index 4448ee4..7b45085 100644 --- a/ng-seed/src/app/session/register/register.component.ts +++ b/ng-seed/src/app/session/register/register.component.ts @@ -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}$', ),]), diff --git a/ng-seed/src/app/shared/demo.module.ts b/ng-seed/src/app/shared/demo.module.ts index 35156ca..83a20d7 100644 --- a/ng-seed/src/app/shared/demo.module.ts +++ b/ng-seed/src/app/shared/demo.module.ts @@ -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 {} \ No newline at end of file diff --git a/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.spec.ts b/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.spec.ts new file mode 100644 index 0000000..8f52bb1 --- /dev/null +++ b/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.spec.ts @@ -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(); + }); +}); diff --git a/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.ts b/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.ts new file mode 100644 index 0000000..2479327 --- /dev/null +++ b/ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.ts @@ -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(); + } + } + +} diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 75d19cb..5d1e46d 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -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",