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

This commit is contained in:
surendar.m@watermelon.us 2023-04-17 17:23:27 +05:30
commit 3404c8d538
13 changed files with 298 additions and 38 deletions

View File

@ -96,7 +96,7 @@ export class DialogBoxComponent implements OnInit {
duration: any;
userData: any;
appoinmentsIds: any=[];
customersList: any;
customersList: any=[];
customerId: any;
slotsResult: any;
ServiceId: any;

View File

@ -167,52 +167,95 @@ export class EditWorkingHoursComponent implements OnInit {
this.seedFiltersFormArray5();
this.seedFiltersFormArray6();
this.seedFiltersFormArray7();
setTimeout(() => {
//setInterval(() => {
let sunday ={filters :this.data[0].sunday.hours }
if(this.data[0].sunday.hours.length>1){
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
this.addFilterToFiltersFormArray()
}
// if(this.data[0].sunday.hours.length>1){
// }
this.dynamicForm.patchValue(sunday)
let monday ={filters :this.data[1].monday.hours }
if(this.data[1].monday.hours.length>1){
// this.data[1].monday.hours.forEach(element => {
// element.value = null
// });
let monday ={filters2 :this.data[1].monday.hours }
for(let i=0;i<=this.data[1].monday.hours.length-2;i++){
console.log(monday)
this.addFilterToFiltersFormArray2()
this.dynamicForm2.patchValue(monday)
}
// if(this.data[1].monday.hours.length>1){
// this.addFilterToFiltersFormArray2()
// }
this.dynamicForm2.patchValue(monday)
let tuesday ={filters :this.data[2].tuesday.hours }
if(this.data[2].tuesday.hours.length>1){
let tuesday ={filters3 :this.data[2].tuesday.hours }
// if(this.data[2].tuesday.hours.length>1){
// this.addFilterToFiltersFormArray3()
// }
for(let i=0;i<=this.data[2].tuesday.hours.length-2;i++){
// console.log(monday)
this.addFilterToFiltersFormArray3()
this.dynamicForm3.patchValue(tuesday)
}
this.dynamicForm3.patchValue(tuesday)
let wednesday ={filters :this.data[3].wednesday.hours }
if(this.data[3].wednesday.hours.length>1){
this.addFilterToFiltersFormArray4()
}
let wednesday ={filters4 :this.data[3].wednesday.hours }
// if(this.data[3].wednesday.hours.length>1){
// this.addFilterToFiltersFormArray4()
// }
for(let i=0;i<=this.data[3].wednesday.hours.length-2;i++){
// console.log(monday)
this.addFilterToFiltersFormArray4()
this.dynamicForm4.patchValue(wednesday)
let thursday ={filters :this.data[4].thursday.hours }
if(this.data[4].thursday.hours.length>1){
this.addFilterToFiltersFormArray5()
}
}
let thursday ={filters5 :this.data[4].thursday.hours }
// if(this.data[4].thursday.hours.length>1){
// this.addFilterToFiltersFormArray5()
// }
for(let i=0;i<=this.data[4].thursday.hours.length-2;i++){
// console.log(monday)
this.addFilterToFiltersFormArray5()
this.dynamicForm5.patchValue(thursday)
let friday ={filters :this.data[5].friday.hours }
if(this.data[5].friday.hours.length>1){
this.addFilterToFiltersFormArray6()
}
}
// this.dynamicForm5.patchValue(thursday)
let friday ={filters6 :this.data[5].friday.hours }
// if(this.data[5].friday.hours.length>1){
// this.addFilterToFiltersFormArray6()
// }
for(let i=0;i<=this.data[5].friday.hours.length-2;i++){
// console.log(monday)
this.addFilterToFiltersFormArray6()
this.dynamicForm6.patchValue(friday)
let saturday ={filters :this.data[6].saturday.hours }
if(this.data[6].saturday.hours.length>1){
this.addFilterToFiltersFormArray7()
}
}
let saturday ={filters7 :this.data[6].saturday.hours }
// if(this.data[6].saturday.hours.length>1){
// this.addFilterToFiltersFormArray7()
// }
for(let i=0;i<=this.data[6].saturday.hours.length-2;i++){
// console.log(monday)
this.addFilterToFiltersFormArray7()
this.dynamicForm7.patchValue(saturday)
}
}, 2000);
// this.dynamicForm7.patchValue(saturday)
// }, 2000);
}

View File

@ -24,7 +24,7 @@
</mat-form-field>
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
<mat-label>Role</mat-label>
<mat-select placeholder="Select Role" formControlName="role" required>
<mat-select placeholder="Select Role" formControlName="role" required [disabled]="disableBus ==0">
<mat-option>--</mat-option>
<mat-option *ngFor="let roleNmae of role" [value]="roleNmae.name">
{{roleNmae.name}}

View File

@ -116,6 +116,10 @@ export class AddUserComponent implements OnInit {
// if( localStorage.getItem('go_admin') =='0'){
this.local_data.businessselect = localStorage.getItem('busNameID')
this.form.controls['businessselect'].setValue(localStorage.getItem('busNameID'))
if( this.disableBus == 0){
this.form.controls['role'].setValue('BADMIN')
}
// }
//localStorage.setItem('busNameID',getData.busId)
@ -154,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

@ -169,8 +169,11 @@ export class UserListComponent implements OnInit {
}
openDialog(action,obj) {
if(action == 'Update' || action == 'Delete'){
localStorage.setItem('busNameID',obj.busId
)
}
obj.action = action;
const dialogRef = this.dialog.open(AddUserComponent, {
// width: '30%',

View File

@ -1 +1,64 @@
<h1>welcome</h1>
<div fxLayout="row wrap">
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100" class="m-gap p-gap">
<mat-card>
<div class="card-wheather grad-blue">
<div class="city">New Orders</div>
<div class="date">This Week</div>
<div class="weather">
<div class="sun d-flex justify-content-between">
<i class="fa fa-shopping-bag fa-3x align-self-center"></i>
<div class="temp align-self-center">190</div>
</div>
</div>
</div>
</mat-card>
</div>
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100" class="m-gap p-gap">
<mat-card>
<div class="card-wheather grad-green">
<div class="city">Total Profit</div>
<div class="date">This Week</div>
<div class="weather">
<div class="sun d-flex justify-content-between">
<i class="fa fa fa-users fa-3x align-self-center"></i>
<div class="temp align-self-center">987</div>
</div>
</div>
</div>
</mat-card>
</div>
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100" class="m-gap p-gap">
<mat-card>
<div class="card-wheather grad-red">
<div class="city">Email</div>
<div class="date">This Week</div>
<div class="weather">
<div class="sun d-flex justify-content-between">
<i class="fa fa-inbox fa-3x align-self-center"></i>
<div class="temp align-self-center">236</div>
</div>
</div>
</div>
</mat-card>
</div>
</div>
<div fxLayout="row wrap">
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100" class="m-gap p-gap">
<mat-card>
<mat-card-title fxLayout="row" fxLayoutAlign="start center">
Total Sales &nbsp;
<span fxFlex></span>
<!-- <button mat-icon-button mat-button-sm [mat-menu-trigger-for]="card2" aria-label="Open card menu">
<mat-icon>more_vert</mat-icon>
</button> -->
</mat-card-title>
<hr>
<mat-card-content>
<div class="w-100 h-300px">
<ngx-charts-area-chart [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabel" [autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-area-chart>
</div>
</mat-card-content>
</mat-card>
</div>
</div>

View File

@ -1,12 +1,30 @@
import { Component } from '@angular/core';
import { single, multi } from './charts.data';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
export class DashboardComponent {
public single: any[];
public multi: any[];
public showXAxis = true;
public showYAxis = true;
public gradient = false;
public showLegend = false;
public showXAxisLabel = false;
public xAxisLabel = 'Year';
public showYAxisLabel = false;
public yAxisLabel = 'Population';
public colorScheme = {
domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3']
};
public autoScale = true;
constructor() {
// this.fetch((data) => { this.rows = data; });
Object.assign(this, {single, multi})
}
onSelect(event) {
console.log(event);
}
}

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

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

@ -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,9 @@ 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{
this.router.navigate([URL+"/slots/list"])
}
}

View File

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

View File

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