working hours
This commit is contained in:
parent
80e95b3f91
commit
1c541f1a07
Binary file not shown.
@ -4,6 +4,7 @@
|
||||
<mat-label>Filter</mat-label>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
|
||||
</mat-form-field>
|
||||
<mat-checkbox class="example-margin" (change)="setAll($event.checked)">Click here to see Inactive List</mat-checkbox>
|
||||
<button mat-button (click)="openDialog('Add',{})" class="button">Add Business</button>
|
||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
@ -67,7 +68,8 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="row.isActive != 1 ? 'bgRowColor' : ''"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
<!-- <tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="row.isActive != 1 ? 'bgRowColor' : ''"></tr> -->
|
||||
</table>
|
||||
|
||||
</ng-scrollbar>
|
||||
|
||||
@ -34,6 +34,7 @@ export class BusinessListComponent implements OnInit {
|
||||
businessList: any[] = [];
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
isLoading = true
|
||||
activeAndInactive: boolean = false;
|
||||
constructor(private notifierService: NotifierService,private router:Router,public dialog: MatDialog,public _bus:BusinessService) {
|
||||
|
||||
}
|
||||
@ -96,23 +97,35 @@ export class BusinessListComponent implements OnInit {
|
||||
if (res.status == 200) {
|
||||
this.isLoading = false
|
||||
this.businessList = res.data;
|
||||
console.log(this.businessList)
|
||||
this.businessListLength = res.data.length;
|
||||
console.log(this.businessListLength)
|
||||
console.log(this.businessList)
|
||||
this.businessList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
this.businessList.forEach((element, index) => {
|
||||
if(this.activeAndInactive == true){
|
||||
this.businessListSource['data'] = this.businessList.filter(val => val.isActive == 0)
|
||||
console.log('Inactive',this.businessListSource['data'])
|
||||
}else {
|
||||
this.businessListSource['data'] = this.businessList.filter(val => val.isActive == 1)
|
||||
console.log('Active',this.businessListSource['data'])
|
||||
}
|
||||
this.businessListSource['data'].forEach((element:any, index) => {
|
||||
element.index = index
|
||||
element.state = JSON.parse(element.state)
|
||||
console.log(element.state)
|
||||
element.city = JSON.parse(element.city)
|
||||
console.log(element.city)
|
||||
});
|
||||
console.log(this.businessList)
|
||||
this.businessListSource['data'] = this.businessList;
|
||||
// console.log(this.businessList)
|
||||
// this.businessListSource['data'] = this.businessList;
|
||||
this.businessListLength = this.businessListSource['data'].length
|
||||
// this.recordStatus= true;
|
||||
if(this.businessListLength > 0){
|
||||
this.recordStatus= false;
|
||||
}else{
|
||||
this.recordStatus=true;
|
||||
}
|
||||
console.log(this.businessListSource)
|
||||
this.recordStatus=false;
|
||||
// this.recordStatus=false;
|
||||
}
|
||||
else{
|
||||
this.isLoading = false
|
||||
@ -290,4 +303,10 @@ export class BusinessListComponent implements OnInit {
|
||||
return this.apiUrl+'imageViewer?img_name='+image;
|
||||
}
|
||||
|
||||
setAll(check) {
|
||||
console.log(check)
|
||||
this.activeAndInactive = check
|
||||
this.getBusinessList()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -57,13 +57,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray(i)" [disabled]="Select1 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray.length == i+1" (click)="addFilterToFiltersFormArray(i)" [disabled]="Select1 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray(i)" [disabled]="Select1 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray(i)" [disabled]="Select1 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(1,selectFilterTimeDropdown)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(1,selectFilterTimeDropdown)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,13 +129,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray2(i)" [disabled]="Select2 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray2.length == i+1" (click)="addFilterToFiltersFormArray2(i)" [disabled]="Select2 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray2(i)" [disabled]="Select2 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray2(i)" [disabled]="Select2 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(2,selectFilterTimeDropdown2)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(2,selectFilterTimeDropdown2)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -201,13 +201,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray3(i)" [disabled]="Select3 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray3.length == i+1" (click)="addFilterToFiltersFormArray3(i)" [disabled]="Select3 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray3(i)" [disabled]="Select3 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray3(i)" [disabled]="Select3 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(3,selectFilterTimeDropdown3)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(3,selectFilterTimeDropdown3)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -273,13 +273,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray4(i)" [disabled]="Select4 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray4.length == i+1" (click)="addFilterToFiltersFormArray4(i)" [disabled]="Select4 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray4(i)" [disabled]="Select4 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray4(i)" [disabled]="Select4 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(4,selectFilterTimeDropdown4)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(4,selectFilterTimeDropdown4)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -345,13 +345,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray5(i)" [disabled]="Select5 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray5.length == i+1" (click)="addFilterToFiltersFormArray5(i)" [disabled]="Select5 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray5(i)" [disabled]="Select5 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray5(i)" [disabled]="Select5 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(5,selectFilterTimeDropdown5)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(5,selectFilterTimeDropdown5)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -417,13 +417,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray6(i)" [disabled]="Select6 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray6.length == i+1" (click)="addFilterToFiltersFormArray6(i)" [disabled]="Select6 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray6(i)" [disabled]="Select6 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray6(i)" [disabled]="Select6 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(6,selectFilterTimeDropdown6)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(6,selectFilterTimeDropdown6)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -489,13 +489,13 @@
|
||||
formControlName="value"
|
||||
[placeholder]="apiField.value">
|
||||
</mat-form-field> -->
|
||||
<button *ngIf="i == 0" (click)="addFilterToFiltersFormArray7(i)" [disabled]="Select7 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="filtersFormArray7.length == i+1" (click)="addFilterToFiltersFormArray7(i)" [disabled]="Select7 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">add</mat-icon>
|
||||
</button>
|
||||
<button (click)="removeFilterFromFiltersFormArray7(i)" [disabled]="Select7 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<button *ngIf="i != 0" (click)="removeFilterFromFiltersFormArray7(i)" [disabled]="Select7 != true" mat-icon-button aria-label="Example icon-button with a heart icon">
|
||||
<mat-icon class="deleteRow">delete</mat-icon>
|
||||
</button>
|
||||
<!-- <a *ngIf="i == 0" (click)="applyToAll(7,selectFilterTimeDropdown7)">Apply to All</a> -->
|
||||
<a *ngIf="i == 0" (click)="applyToAll(7,selectFilterTimeDropdown7)">Apply to All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -826,8 +826,11 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
fliterTimeSelect2(data , i)
|
||||
{
|
||||
//console.log(data[i][0])
|
||||
return data[i][0][0]
|
||||
// console.log(data[i][0])
|
||||
if(data[i][0][0] != undefined){
|
||||
return data[i][0][0]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fliterTimeSelect3(data , i)
|
||||
@ -898,7 +901,7 @@ return data[i][1][0]
|
||||
this.selectFilterTimeDropdown5 = param
|
||||
this.selectFilterTimeDropdown6 = param
|
||||
this.selectFilterTimeDropdown7 = param
|
||||
console.log(this['dynamicForm'+num].value['filters'+num])
|
||||
console.log(this['dynamicForm'+num])
|
||||
|
||||
let sunday ={filters1 :this['dynamicForm'+num].value['filters'+num] }
|
||||
let monday ={filters2 :this['dynamicForm'+num].value['filters'+num] }
|
||||
@ -907,7 +910,8 @@ return data[i][1][0]
|
||||
let thursday ={filters5 :this['dynamicForm'+num].value['filters'+num] }
|
||||
let friday ={filters6:this['dynamicForm'+num].value['filters'+num] }
|
||||
let saturday ={filters7 :this['dynamicForm'+num].value['filters'+num] }
|
||||
|
||||
|
||||
|
||||
if(this['dynamicForm'+num].value['filters'+num].length>1){
|
||||
console.log('length')
|
||||
for(let j=1;j<=this['dynamicForm'+num].value['filters'+num].length-1;j++){
|
||||
@ -917,6 +921,7 @@ return data[i][1][0]
|
||||
}
|
||||
if(i != 2){
|
||||
console.log('2')
|
||||
this.dynamicForm2.reset();
|
||||
this.filtersFormArray2.push(this.createFilterGroup());
|
||||
}
|
||||
if(i != 3){
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
<mat-option value="BIZADMIN" (click)="applyFilter('BIZADMIN')">BIZADMIN</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<mat-checkbox class="example-margin" (change)="setAll($event.checked)">Click here to see Inactive List</mat-checkbox>
|
||||
<button mat-button (click)="openDialog('Add',{})" class="button">Add Users</button>
|
||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||
|
||||
@ -113,7 +114,8 @@
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="row.isActive != 1 ? 'bgRowColor' : ''"></tr>
|
||||
<!-- <tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="row.isActive != 1 ? 'bgRowColor' : ''"></tr> -->
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
</ng-scrollbar>
|
||||
|
||||
@ -64,6 +64,7 @@ export class UserListComponent implements OnInit {
|
||||
usersListLength: any=5;
|
||||
businessList: any;
|
||||
isLoading = true
|
||||
activeAndInactive: boolean = false;
|
||||
constructor(private notifierService: NotifierService,public dialog: MatDialog, public _use:UserService,public _bus:BusinessService) {
|
||||
let open_go_admin = localStorage.getItem('go_admin')
|
||||
if(open_go_admin == '0'){
|
||||
@ -152,14 +153,28 @@ export class UserListComponent implements OnInit {
|
||||
usersList = usersList.filter((value,key)=>{
|
||||
return value.id != userID
|
||||
});
|
||||
usersList.forEach((element, index) => {
|
||||
|
||||
if(this.activeAndInactive == true){
|
||||
this.usersList['data'] = usersList.filter(val => val.isActive == 0)
|
||||
console.log('Inactive',this.usersList['data'])
|
||||
}else {
|
||||
this.usersList['data'] = usersList.filter(val => val.isActive == 1)
|
||||
console.log('Active',this.usersList['data'])
|
||||
}
|
||||
|
||||
this.usersList['data'].forEach((element:any, index) => {
|
||||
element.index = index
|
||||
|
||||
});
|
||||
this.usersList['data'] = usersList;
|
||||
// this.users/List['data'] = usersList;
|
||||
|
||||
this.usersListLength = usersList.length;
|
||||
this.recordStatus=false;
|
||||
this.usersListLength = this.usersList['data'].length;
|
||||
if(this.usersListLength > 0){
|
||||
this.recordStatus= false;
|
||||
}else{
|
||||
this.recordStatus=true;
|
||||
}
|
||||
// this.recordStatus=false;
|
||||
}
|
||||
else{
|
||||
// this.usersList=[];
|
||||
@ -422,4 +437,10 @@ export class UserListComponent implements OnInit {
|
||||
|
||||
return this.apiUrl+'imageViewer?img_name='+image;
|
||||
}
|
||||
|
||||
setAll(check) {
|
||||
console.log(check)
|
||||
this.activeAndInactive = check
|
||||
this.getUsersList()
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,11 +62,11 @@ export class CustomerInfoComponent implements OnInit {
|
||||
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
|
||||
),]),
|
||||
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||
address_1: new FormControl('', [ Validators.maxLength(100)]),
|
||||
city: new FormControl(''),
|
||||
state: new FormControl(''),
|
||||
address_1: new FormControl('', [Validators.required,Validators.maxLength(100)]),
|
||||
city: new FormControl('',[Validators.required]),
|
||||
state: new FormControl('',[Validators.required]),
|
||||
otp: new FormControl('', [ Validators.maxLength(6),Validators.minLength(6)]),
|
||||
pincode: new FormControl(''),
|
||||
pincode: new FormControl('',[Validators.required]),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="relative">
|
||||
<div class="form-bg">
|
||||
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
||||
<div fxLayout="row" fxLayoutAlign="center center" class="pad_top">
|
||||
<div fxLayout="column" fxFlex.xl="40" fxFlex.lg="40" fxFlex.md="50" fxFlex.sm="80" fxFlex.xs="90">
|
||||
<mat-card class="login-session">
|
||||
<div>
|
||||
<h2 class="base-border">Login Form</h2>
|
||||
<h2 class="base-border">Login</h2>
|
||||
<p>Enter Your Login Details</p>
|
||||
<form [formGroup]="loginForm" (ngSubmit)="onSubmit()" novalidate class="d-flex-center">
|
||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||
@ -30,14 +30,12 @@
|
||||
<!-- <button class="mt-2 mb-1" [disabled]="!loginForm.valid" mat-raised-button color="primary" mat-button>Sign In</button> -->
|
||||
<button class="mt-2 mb-1" mat-raised-button color="primary" mat-button>Sign In</button>
|
||||
<a class="mat-text-warn mb-0" (click)="openForgot()">Forgot password?</a>
|
||||
<p class="mb-0">Don't have an account? <a [routerLink]="['/authentication/register']" class="mat-text-primary">Register Here</a></p>
|
||||
<!-- <p class="mb-0">Don't have an account? <a [routerLink]="['/authentication/register']" class="mat-text-primary">Register Here</a></p> -->
|
||||
</div>
|
||||
<div>
|
||||
<p>Sign in using</p>
|
||||
<!-- <a href="#" class="shared-icon mr-1 mat-blue">
|
||||
<i class="fa fa-facebook fa-lg mr-1"></i> Facebook</a> -->
|
||||
<!-- <div>
|
||||
<p>Sign in using</p>
|
||||
<a href="#" class="shared-icon mat-red">
|
||||
<i class="fa fa-google fa-lg mr-1"></i>Google</a></div>
|
||||
<i class="fa fa-google fa-lg mr-1"></i>Google</a></div> -->
|
||||
</form>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
::ng-deep .mat-drawer-content{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.pad_top{
|
||||
padding-top: 5.5rem !important;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user