Url Setup

This commit is contained in:
surendar.m@watermelon.us 2023-04-18 10:55:14 +05:30
parent 3404c8d538
commit 9791d6390c
9 changed files with 55 additions and 29 deletions

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

@ -43,6 +43,8 @@ ngOnInit() {
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

@ -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

@ -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

@ -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>{{durationArray.length>0 ? durationArray.fees : servicesName.fees}}</span>
</div>
</div>

View File

@ -51,11 +51,15 @@ export class SlotBookingDetailsComponent implements OnInit {
doctor: any=[];
servicesName: any=[];
user: any=[];
durationArray: 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){
console.log(res[0])
this.durationArray = res[0]
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()

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",