workspace
This commit is contained in:
parent
4ec04f50d4
commit
1e9f6c6cdd
@ -7,7 +7,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div style="width:40px;margin-right:10px;">
|
<div style="width:40px;margin-right:10px;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span class="title">cloudnSure</span>
|
<span class="title">cloudnSure</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div *ngIf="editMode === 'data1';then basic_property"> -->
|
<!-- <div *ngIf="editMode === 'data1';then basic_property"> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="container">
|
<!-- <div class="container">
|
||||||
|
|
||||||
<h2 class="text-center"><b>Welcome to <strong>cloudnsure!</strong></b></h2>
|
<h2 class="text-center"><b>Welcome to <strong>cloudnsure!</strong></b></h2>
|
||||||
<h5 class="text-center">You're signing up as <strong style="font-size: 20px;">here is email</strong></h5>
|
<h5 class="text-center">You're signing up as <strong style="font-size: 20px;">here is email</strong></h5>
|
||||||
@ -79,37 +79,38 @@
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="display_msg">
|
<div class="display_msg">
|
||||||
<h2 class="text-center"><b>Welcome to <strong>cloudnsure!</strong></b></h2>
|
<h2 class="text-center"><b>Welcome to <strong>cloudnsure!</strong></b></h2>
|
||||||
<h5 class="text-center" *ngIf="email">You're signing up as <strong style="font-size: 20px;">{{email}}</strong></h5>
|
<h5 class="text-center" *ngIf="email">You're signing up as <strong style="font-size: 20px;">{{email}}</strong>
|
||||||
<br>
|
</h5>
|
||||||
<form class="form" [formGroup]="form">
|
<br>
|
||||||
<label><b>First Name</b></label><br>
|
<form class="form" [formGroup]="form">
|
||||||
<input type="text" class="form__field" placeholder="Enter First Name" formControlName="first_name">
|
<label><b>First Name</b></label><br>
|
||||||
<div *ngIf="f.first_name.invalid && (f.first_name.dirty || f.first_name.touched)"
|
<input type="text" class="form__field" placeholder="Enter First Name" formControlName="first_name">
|
||||||
|
<div *ngIf="f.first_name.invalid && (f.first_name.dirty || f.first_name.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
<div *ngIf="f.first_name.errors.required">First Name is required</div>
|
<div *ngIf="f.first_name.errors.required">First Name is required</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<label><b>Last Name</b></label><br>
|
<label><b>Last Name</b></label><br>
|
||||||
<input type="text" class="form__field" placeholder="Enter Last Name" formControlName="last_name">
|
<input type="text" class="form__field" placeholder="Enter Last Name" formControlName="last_name">
|
||||||
<div *ngIf="f.last_name.invalid && (f.last_name.dirty || f.last_name.touched)"
|
<div *ngIf="f.last_name.invalid && (f.last_name.dirty || f.last_name.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
<div *ngIf="f.last_name.errors.required">Last Name is required</div>
|
<div *ngIf="f.last_name.errors.required">Last Name is required</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<label><b>Mobile Number</b></label><br>
|
<label><b>Mobile Number</b></label><br>
|
||||||
<input type="text" class="form__field" placeholder="Enter Mobile Number" formControlName="mob_no">
|
<input type="text" class="form__field" placeholder="Enter Mobile Number" formControlName="mob_no">
|
||||||
<div *ngIf="f.mob_no.invalid && (f.mob_no.dirty || f.mob_no.touched)"
|
<div *ngIf="f.mob_no.invalid && (f.mob_no.dirty || f.mob_no.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
<div *ngIf="f.mob_no.errors.required">Mobile Number is required</div>
|
<div *ngIf="f.mob_no.errors.required">Mobile Number is required</div>
|
||||||
<div *ngIf="f.mob_no.errors.minlength">Mobile Number is 10 numbers</div>
|
<div *ngIf="f.mob_no.errors.minlength">Mobile Number is 10 numbers</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<label><b>New Password</b></label><br>
|
<label><b>New Password</b></label><br>
|
||||||
<input class="form__field" type="password" [type]="newpHide ? 'password': 'text'"
|
<input class="form__field" type="password" [type]="newpHide ? 'password': 'text'"
|
||||||
placeholder="Enter New Password" formControlName="password"/>
|
placeholder="Enter New Password" formControlName="password" />
|
||||||
<clr-icon [attr.shape]="newIcon" (click)="newShapeChanger()"></clr-icon>
|
<clr-icon [attr.shape]="newIcon" (click)="newShapeChanger()"></clr-icon>
|
||||||
<div *ngIf="f.password.invalid && (f.password.dirty || f.password.touched)"
|
<div *ngIf="f.password.invalid && (f.password.dirty || f.password.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
@ -119,24 +120,18 @@
|
|||||||
<br>
|
<br>
|
||||||
<label><b>Re-Enter New Password</b></label><br>
|
<label><b>Re-Enter New Password</b></label><br>
|
||||||
<input class="form__field" type="password" [type]="cpHide ? 'password': 'text'"
|
<input class="form__field" type="password" [type]="cpHide ? 'password': 'text'"
|
||||||
placeholder="Re-Enter New Password" formControlName="confirm_passwordS"/>
|
placeholder="Re-Enter New Password" formControlName="confirm_password" />
|
||||||
<clr-icon [attr.shape]="conIcon" (click)="comfShapeChanger()"></clr-icon>
|
<clr-icon [attr.shape]="conIcon" (click)="comfShapeChanger()"></clr-icon>
|
||||||
<div *ngIf="f.confirm_passwordS.invalid && (f.confirm_passwordS.dirty || f.confirm_passwordS.touched)"
|
<div *ngIf="f.confirm_password.invalid && (f.confirm_password.dirty || f.confirm_password.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
<div *ngIf="f.confirm_passwordS.errors.required">Password is required.</div>
|
<div *ngIf="f.confirm_password.errors.required">Password is required.</div>
|
||||||
<div *ngIf="f.confirm_passwordS.errors.confirmedValidator">Password and Confirm Password must be match.</div>
|
<div *ngIf="f.confirm_password.errors.confirmedValidator">Password and Confirm Password must be match.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn--primary uppercase" (click)="onsubmit()">continue</button>
|
<button type="submit" class="btn btn--primary uppercase" (click)="onsubmit()">continue</button>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
<p style="color: red;" *ngIf="passchange"><clr-icon shape="check"></clr-icon> User Info Is Added Please Login </p>
|
<p style="color: red;" *ngIf="passchange"><clr-icon shape="check"></clr-icon> User Info Is Added Please Login </p>
|
||||||
<p> Wrong account? <a routerLink="/login">Log in</a> instead.</p>
|
<p> Wrong account? <a routerLink="/login">Log in</a> instead.</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export class AddguestComponent implements OnInit {
|
|||||||
last_name: ['', Validators.required],
|
last_name: ['', Validators.required],
|
||||||
mob_no: ['', [Validators.required,Validators.minLength(10)]],
|
mob_no: ['', [Validators.required,Validators.minLength(10)]],
|
||||||
password: ['',[ Validators.required, Validators.minLength(6), Validators.maxLength(40)]],
|
password: ['',[ Validators.required, Validators.minLength(6), Validators.maxLength(40)]],
|
||||||
confirm_passwordS: ['', Validators.required],
|
confirm_password: ['', Validators.required],
|
||||||
|
|
||||||
}, );
|
}, );
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,12 +119,12 @@
|
|||||||
<br>
|
<br>
|
||||||
<label><b>Re-Enter New Password</b></label><br>
|
<label><b>Re-Enter New Password</b></label><br>
|
||||||
<input class="form__field" type="password" [type]="cpHide ? 'password': 'text'"
|
<input class="form__field" type="password" [type]="cpHide ? 'password': 'text'"
|
||||||
placeholder="Re-Enter New Password" formControlName="confirm_passwordS"/>
|
placeholder="Re-Enter New Password" formControlName="confirm_password"/>
|
||||||
<clr-icon [attr.shape]="conIcon" (click)="comfShapeChanger()"></clr-icon>
|
<clr-icon [attr.shape]="conIcon" (click)="comfShapeChanger()"></clr-icon>
|
||||||
<div *ngIf="f.confirm_passwordS.invalid && (f.confirm_passwordS.dirty || f.confirm_passwordS.touched)"
|
<div *ngIf="f.confirm_password.invalid && (f.confirm_password.dirty || f.confirm_password.touched)"
|
||||||
style="color:indianred; font-weight: bold">
|
style="color:indianred; font-weight: bold">
|
||||||
<div *ngIf="f.confirm_passwordS.errors.required">Password is required.</div>
|
<div *ngIf="f.confirm_password.errors.required">Password is required.</div>
|
||||||
<div *ngIf="f.confirm_passwordS.errors.confirmedValidator">Password and Confirm Password must be match.</div>
|
<div *ngIf="f.confirm_password.errors.confirmedValidator">Password and Confirm Password must be match.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn--primary uppercase" (click)="onsubmit()">continue</button>
|
<button type="submit" class="btn btn--primary uppercase" (click)="onsubmit()">continue</button>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { MyworkspaceService } from 'src/app/services/admin/myworkspace.service';
|
import { MyworkspaceService } from 'src/app/services/admin/myworkspace.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -9,14 +10,14 @@ import { MyworkspaceService } from 'src/app/services/admin/myworkspace.service';
|
|||||||
styleUrls: ['./forgotresetpassword1.component.scss']
|
styleUrls: ['./forgotresetpassword1.component.scss']
|
||||||
})
|
})
|
||||||
export class Forgotresetpassword1Component implements OnInit {
|
export class Forgotresetpassword1Component implements OnInit {
|
||||||
public form: FormGroup;
|
public form: FormGroup;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
passchange;
|
passchange;
|
||||||
newpHide: boolean = true;
|
newpHide: boolean = true;
|
||||||
newIcon: string = "eye";
|
newIcon: string = "eye";
|
||||||
newShapeChanger() {
|
newShapeChanger() {
|
||||||
this.newpHide = !this.newpHide;
|
this.newpHide = !this.newpHide;
|
||||||
if(this.newpHide){
|
if (this.newpHide) {
|
||||||
this.newIcon = 'eye'
|
this.newIcon = 'eye'
|
||||||
} else {
|
} else {
|
||||||
this.newIcon = 'eye-hide'
|
this.newIcon = 'eye-hide'
|
||||||
@ -26,7 +27,7 @@ export class Forgotresetpassword1Component implements OnInit {
|
|||||||
conIcon: string = "eye";
|
conIcon: string = "eye";
|
||||||
comfShapeChanger() {
|
comfShapeChanger() {
|
||||||
this.cpHide = !this.cpHide;
|
this.cpHide = !this.cpHide;
|
||||||
if(this.cpHide){
|
if (this.cpHide) {
|
||||||
this.conIcon = 'eye'
|
this.conIcon = 'eye'
|
||||||
} else {
|
} else {
|
||||||
this.conIcon = 'eye-hide'
|
this.conIcon = 'eye-hide'
|
||||||
@ -37,7 +38,8 @@ export class Forgotresetpassword1Component implements OnInit {
|
|||||||
token;
|
token;
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private mywork:MyworkspaceService) { }
|
private mywork: MyworkspaceService,
|
||||||
|
private toastr: ToastrService,) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.email = this.mywork.getStoredEmail();
|
this.email = this.mywork.getStoredEmail();
|
||||||
@ -49,19 +51,21 @@ export class Forgotresetpassword1Component implements OnInit {
|
|||||||
{
|
{
|
||||||
first_name: ['', Validators.required],
|
first_name: ['', Validators.required],
|
||||||
last_name: ['', Validators.required],
|
last_name: ['', Validators.required],
|
||||||
mob_no: ['', [Validators.required,Validators.minLength(10)]],
|
mob_no: ['', [Validators.required, Validators.minLength(10)]],
|
||||||
password: ['',[ Validators.required, Validators.minLength(6), Validators.maxLength(40)]],
|
password: ['', [Validators.required, Validators.minLength(6), Validators.maxLength(40)]],
|
||||||
confirm_passwordS: ['', Validators.required],
|
confirm_password: ['', Validators.required],
|
||||||
|
|
||||||
}, );
|
},);
|
||||||
}
|
}
|
||||||
onsubmit(){
|
onsubmit() {
|
||||||
this.mywork.adduserdetails(this.form.value,this.token).subscribe((data)=>{
|
this.mywork.adduserdetails(this.form.value, this.token).subscribe((data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.passchange=data;
|
this.passchange = data;
|
||||||
console.log('success ', data);
|
this.toastr.success('Email Send successfully');
|
||||||
},(err) => {
|
console.log('success ', data);
|
||||||
console.log('failure ', err);
|
}, (err) => {
|
||||||
})
|
this.toastr.error("Server Error");
|
||||||
|
console.log('failure ', err);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
export const LoginEnvironment = {
|
export const LoginEnvironment = {
|
||||||
|
|
||||||
"templateNo": "<templateNo>",
|
"templateNo": "Template 1",
|
||||||
"loginHeading": "<loginHeading>",
|
"loginHeading": "Welcome",
|
||||||
"loginHeading2": "<loginHeading2>",
|
"loginHeading2": "io8.dev1",
|
||||||
"isSignup": "<isSignup>",
|
"isSignup": "true",
|
||||||
"loginSignup": "<loginSignup> ",
|
"loginSignup": "Use your ID to sign in OR ",
|
||||||
"loginSignup2": "<loginSignup2>",
|
"loginSignup2": "create one now",
|
||||||
"loginForgotpass": "<loginForgotpass>",
|
"loginForgotpass": "FORGOT PASSWORD?",
|
||||||
"loginImage": "<loginImage>",
|
"loginImage": "[]",
|
||||||
"loginImageURL": "<loginImageURL>"
|
"loginImageURL": "null"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,85 @@
|
|||||||
|
.s-info-bar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.s-info-bar button {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete, .heading {
|
||||||
|
text-align: center;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-pg {
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button1::after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button1:hover::after {
|
||||||
|
content: "ADD ROWS";
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
background-color: #dddddd;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section p {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clr-input {
|
||||||
|
color: #212529;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
padding: 0.75rem 0.75rem;
|
||||||
|
margin-top: 3px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clr-file {
|
||||||
|
color: #212529;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
margin-top: 3px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 3px;
|
||||||
|
padding: 5px 5px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text], [type=date], [type=number], textarea {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 15px;
|
||||||
|
background-color: rgb(255, 255, 255);
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error_mess {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.required-field {
|
||||||
|
color: red;
|
||||||
|
font-size: 18px;
|
||||||
|
}/*# sourceMappingURL=myworkspace.component.css.map */
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["myworkspace.component.scss","myworkspace.component.css"],"names":[],"mappings":"AAWA;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;ACVF;ADWE;EACE,aAAA;ACTJ;;ADYA;EACE,kBAAA;EACA,UAAA;ACTF;;ADWA;EACE,YAAA;ACRF;;ADWA;EACE,aAAA;ACRF;;ADUA;EACE,mBAAA;ACPF;;ADUA;EACE,yBAAA;EACA,YAAA;ACPF;;ADUA;EAEE,aAAA;EACA,eAAA;ACRF;;ADWA;EACE,cAAA;EACA,yBAAA;EACA,sBAAA;EACA,wBAAA;EACA,eAAA;EACA,WAAA;EACA,mBAAA;ACRF;;ADWA;EACE,cAAA;EACA,yBAAA;EACA,sBAAA;EAEA,eAAA;EACA,WAAA;EACA,mBAAA;ACTF;;ADYA;EACE,kBAAA;ACTF;;ADWA;EACE,WAAA;EACA,eAAA;EACA,gBAAA;EACA,sBAAA;EACA,kBAAA;ACRF;;ADUA;EACE,WAAA;EACA,kBAAA;EACA,oCAAA;EAEA,qBAAA;EACA,sBAAA;EACA,kBAAA;EACA,sBAAA;ACRF;;ADUA;EACE,UAAA;ACPF;;ADUA;EACE,UAAA;EACF,eAAA;ACPA","file":"myworkspace.component.css"}
|
||||||
@ -0,0 +1,309 @@
|
|||||||
|
<div class="pad-16">
|
||||||
|
<h3><b>Organization and Workspaces</b></h3>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<section class="form-block" style="margin-top:32px">
|
||||||
|
<!-- <form (ngSubmit)="onSubmit()"> -->
|
||||||
|
<table *ngIf="sys_account">
|
||||||
|
<tr>
|
||||||
|
<td><b>Organization:</b> </td>
|
||||||
|
<td> {{ sys_account.companyName }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Account Id:</b> </td>
|
||||||
|
<td>{{ sys_account.gstNumber }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><b> Selected Workspace: </b></td>
|
||||||
|
<td>{{sys_account.workspace }}</td>
|
||||||
|
<span class="label label-light-green p7" style="margin-top: .4em; display: inline; cursor: pointer;margin-left: 20px;" (click)="allworksapce()">switch</span>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- <a routerLink="/create-workspace">create new workspace</a> -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<clr-tabs>
|
||||||
|
<clr-tab>
|
||||||
|
<button clrTabLink>Users</button>
|
||||||
|
<clr-tab-content *clrIfActive>
|
||||||
|
<button class="btn btn-primary" (click)="addUsers()">INVITE USER</button>
|
||||||
|
<clr-datagrid [clrDgLoading]="loading" >
|
||||||
|
<clr-dg-placeholder><clr-spinner [clrMedium]="true">Loading ...</clr-spinner></clr-dg-placeholder>
|
||||||
|
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
No
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Name
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Account Type
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Status
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Actions
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-row *clrDgItems="let user of alluser;let i = index" [clrDgItem]="user">
|
||||||
|
<clr-dg-cell >{{i+1}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell><img class="avatar" src="assets/download.png" alt="" height="50px">
|
||||||
|
{{user.fullName}}<br>{{user.username}}<clr-icon shape="dot-circle"></clr-icon>{{user.email}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell ></clr-dg-cell>
|
||||||
|
<!-- {{user.roles[0].description}} -->
|
||||||
|
<clr-dg-cell > {{user.status}} </clr-dg-cell>
|
||||||
|
<clr-dg-cell > <clr-icon shape="bullet-list"></clr-icon></clr-dg-cell>
|
||||||
|
</clr-dg-row>
|
||||||
|
|
||||||
|
<clr-dg-footer>
|
||||||
|
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||||
|
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||||
|
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||||
|
of {{pagination.totalItems}} users
|
||||||
|
</clr-dg-pagination>
|
||||||
|
</clr-dg-footer>
|
||||||
|
</clr-datagrid>
|
||||||
|
</clr-tab-content>
|
||||||
|
</clr-tab>
|
||||||
|
<clr-tab>
|
||||||
|
<button clrTabLink>Guest</button>
|
||||||
|
<clr-tab-content *clrIfActive>
|
||||||
|
<button class="btn btn-primary" (click)="addguest()">INVITE GUEST</button>
|
||||||
|
<clr-datagrid [clrDgLoading]="loading" >
|
||||||
|
<clr-dg-placeholder><clr-spinner [clrMedium]="true">Loading ...</clr-spinner></clr-dg-placeholder>
|
||||||
|
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
No
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Name
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Account Type
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Status
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Access Till
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Actions
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-row *clrDgItems="let user of allguest;let i = index" [clrDgItem]="user">
|
||||||
|
<clr-dg-cell >{{i+1}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell><img class="avatar" src="assets/download.png" alt="" height="50px">
|
||||||
|
{{user.fullName}}<br>{{user.username}}<clr-icon shape="dot-circle"></clr-icon>{{user.email}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell >{{user.roles[0].description}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell > {{user.status}} </clr-dg-cell>
|
||||||
|
<clr-dg-cell >{{user.access_duration}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell > <clr-icon shape="bullet-list"></clr-icon>
|
||||||
|
</clr-dg-cell>
|
||||||
|
</clr-dg-row>
|
||||||
|
|
||||||
|
<clr-dg-footer>
|
||||||
|
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||||
|
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||||
|
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||||
|
of {{pagination.totalItems}} users
|
||||||
|
</clr-dg-pagination>
|
||||||
|
</clr-dg-footer>
|
||||||
|
</clr-datagrid>
|
||||||
|
</clr-tab-content>
|
||||||
|
</clr-tab>
|
||||||
|
<clr-tab>
|
||||||
|
<button clrTabLink>Teams</button>
|
||||||
|
<clr-tab-content *clrIfActive>
|
||||||
|
<button class="btn btn-primary" (click)="addteam()">ADD TEAM</button>
|
||||||
|
<clr-datagrid [clrDgLoading]="loading" >
|
||||||
|
<clr-dg-placeholder><clr-spinner [clrMedium]="true">Loading ...</clr-spinner></clr-dg-placeholder>
|
||||||
|
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
No
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Team Name
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Owner
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Count
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Members
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<!-- <clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Actions
|
||||||
|
</ng-container></clr-dg-column> -->
|
||||||
|
<clr-dg-row *clrDgItems="let user of allworkspacedata;let i = index" [clrDgItem]="user">
|
||||||
|
<clr-dg-cell >{{i+1}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell>{{user.name}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell >{{user.owner_id}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell >3</clr-dg-cell>
|
||||||
|
<clr-dg-cell > <div (click)="manage(user.id)"> <img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px">
|
||||||
|
<img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px">
|
||||||
|
<img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px"></div>
|
||||||
|
</clr-dg-cell>
|
||||||
|
<!-- <clr-dg-cell >
|
||||||
|
<clr-icon shape="user" (click)="manage(user.id)"></clr-icon>
|
||||||
|
</clr-dg-cell> -->
|
||||||
|
</clr-dg-row>
|
||||||
|
|
||||||
|
<clr-dg-footer>
|
||||||
|
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||||
|
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||||
|
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||||
|
of {{pagination.totalItems}} users
|
||||||
|
</clr-dg-pagination>
|
||||||
|
</clr-dg-footer>
|
||||||
|
</clr-datagrid>
|
||||||
|
</clr-tab-content>
|
||||||
|
</clr-tab>
|
||||||
|
|
||||||
|
</clr-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ADD USERS [hidden]="isAdmin()" -->
|
||||||
|
<!-- <button class="btn btn-primary" (click)="addUsers()">ADD USER</button>
|
||||||
|
<button class="btn btn-primary" (click)="addguest()">ADD GUEST</button>
|
||||||
|
<button class="btn btn-primary" (click)="addteam()">ADD TEAM</button>
|
||||||
|
|
||||||
|
|
||||||
|
<hr> -->
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<clr-modal [(clrModalOpen)]="modalteam" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
|
<h5 class="modal-title">Add A Team To Real It Solutions</h5>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form [formGroup]="teamForm">
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-md-6 clr-col-sm-12" >
|
||||||
|
<label>Name: </label>
|
||||||
|
<input class="clr-input" type="text" name="name" placeholder="Enter name" formControlName="name">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-outline" (click)="modalteam = false">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary" [disabled]="!teamForm.valid" (click)="oncreateteam()">Add</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</clr-modal>
|
||||||
|
|
||||||
|
<clr-modal [(clrModalOpen)]="modalguest" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
|
<h5 class="modal-title">Invite Guest To REALITS-WS</h5>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form [formGroup]="guestForm" >
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-md-12 clr-col-sm-12" >
|
||||||
|
<label>To: <span class="required-field">*</span></label>
|
||||||
|
<input class="clr-input" type="email" formControlName="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" placeholder="name@dekatc.com">
|
||||||
|
<div *ngIf="guestForm.controls['email'].errors" class="error_mess">
|
||||||
|
<div *ngIf="guestForm.controls['email'].hasError('pattern')" class="error_mess">* Email must be a valid email address
|
||||||
|
</div> </div>
|
||||||
|
<!-- <textarea name="" id="" cols="30" rows="4" placeholder="name@dekatc.com" formControlName="email"></textarea> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-md-4 clr-col-sm-12" >
|
||||||
|
<label>Access duration: <span class="required-field">*</span></label>
|
||||||
|
<select formControlName="access_duration">
|
||||||
|
<option value="30" selected>30 day</option>
|
||||||
|
<option value="60">60 day</option>
|
||||||
|
<option value="90">90 day</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-outline" (click)="modalguest= false">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary" [disabled]="!guestForm.valid" (click)="onCreateguest()">Add</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</clr-modal>
|
||||||
|
|
||||||
|
<clr-modal [(clrModalOpen)]="modaluser" [clrModalSize]="'md'" [clrModalStaticBackdrop]="true">
|
||||||
|
<h5 class="modal-title">Invite People To REALITS-WS</h5>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form [formGroup]="userForm" >
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-md-12 clr-col-sm-12" >
|
||||||
|
<label>To: </label>
|
||||||
|
<input class="clr-input" type="email" formControlName="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" placeholder="name@dekatc.com">
|
||||||
|
<div *ngIf="userForm.controls['email'].errors" class="error_mess">
|
||||||
|
<div *ngIf="userForm.controls['email'].hasError('pattern')" class="error_mess">* Email must be a valid email address
|
||||||
|
</div> </div>
|
||||||
|
<!-- <textarea name="" id="" cols="30" rows="4" formControlName="email" placeholder="name@dekatc.com" ></textarea> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a style="float: left;" ><clr-icon shape="link"></clr-icon>Copy Invite Link</a>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-outline" (click)="modaluser = false">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary" [disabled]="!userForm.valid" (click)="onCreateuser()">Add</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</clr-modal>
|
||||||
|
|
||||||
|
<clr-modal [(clrModalOpen)]="allworkmodal" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
|
<h5 class="modal-title">Invite People To REALITS-WS</h5>
|
||||||
|
<div class="modal-body">
|
||||||
|
<clr-datagrid [clrDgLoading]="loading" >
|
||||||
|
<clr-dg-placeholder><clr-spinner [clrMedium]="true">Loading ...</clr-spinner></clr-dg-placeholder>
|
||||||
|
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
No
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Team Name
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Owner
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Count
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Members
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-column > <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
|
Actions
|
||||||
|
</ng-container></clr-dg-column>
|
||||||
|
<clr-dg-row *clrDgItems="let user of allwdata;let i = index" [clrDgItem]="user">
|
||||||
|
<clr-dg-cell >{{i+1}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell>{{user.team_name}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell >{{user.owner_id}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell >3</clr-dg-cell>
|
||||||
|
<clr-dg-cell > <img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px">
|
||||||
|
<img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px">
|
||||||
|
<img class="avatar" src="assets/images/profile-icon.png" alt="" height="50px">
|
||||||
|
</clr-dg-cell>
|
||||||
|
<clr-dg-cell > <clr-icon shape="bullet-list"></clr-icon>
|
||||||
|
|
||||||
|
</clr-dg-cell>
|
||||||
|
</clr-dg-row>
|
||||||
|
|
||||||
|
<clr-dg-footer>
|
||||||
|
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||||
|
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||||
|
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||||
|
of {{pagination.totalItems}} users
|
||||||
|
</clr-dg-pagination>
|
||||||
|
</clr-dg-footer>
|
||||||
|
</clr-datagrid>
|
||||||
|
</div>
|
||||||
|
</clr-modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
// input[type=text],[type=date], select,textarea {
|
||||||
|
// width: 100%;
|
||||||
|
// padding: 12px 20px;
|
||||||
|
// margin: 8px 0;
|
||||||
|
// display: inline-block;
|
||||||
|
// border: 1px solid #ccc;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// box-sizing: border-box;
|
||||||
|
// }
|
||||||
|
|
||||||
|
//@import "../../../../assets/scss/var";
|
||||||
|
.s-info-bar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
button {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.delete,.heading{
|
||||||
|
text-align: center;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.entry-pg {
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button1::after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
.button1:hover::after {
|
||||||
|
content: "ADD ROWS";
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
background-color: #dddddd;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section p {
|
||||||
|
//color: white;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clr-input {
|
||||||
|
color: #212529;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
padding: 0.75rem 0.75rem;
|
||||||
|
margin-top: 3px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clr-file {
|
||||||
|
color: #212529;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
//padding: 0.6rem 0.75rem;
|
||||||
|
margin-top: 3px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
select{
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 3px;
|
||||||
|
padding: 5px 5px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
input[type=text],[type=date],[type=number],textarea {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 15px;
|
||||||
|
background-color:rgb(255, 255, 255);
|
||||||
|
// margin: 8px 0;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.error_mess {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.required-field{
|
||||||
|
color: red;
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { MyworkspaceComponent } from './myworkspace.component';
|
||||||
|
|
||||||
|
describe('MyworkspaceComponent', () => {
|
||||||
|
let component: MyworkspaceComponent;
|
||||||
|
let fixture: ComponentFixture<MyworkspaceComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ MyworkspaceComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(MyworkspaceComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,206 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { UserProfileService } from 'src/app/services/admin/user-profile.service';
|
||||||
|
import { UserInfoService } from 'src/app/services/user-info.service';
|
||||||
|
import { Sys_Account } from 'src/app/services/admin/user-registration.service';
|
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { MyworkspaceService } from './myworkspace.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-myworkspace',
|
||||||
|
templateUrl: './myworkspace.component.html',
|
||||||
|
styleUrls: ['./myworkspace.component.scss']
|
||||||
|
})
|
||||||
|
export class MyworkspaceComponent implements OnInit {
|
||||||
|
loading = false;
|
||||||
|
selected: any[] = [];
|
||||||
|
sys_account: Sys_Account;
|
||||||
|
|
||||||
|
userEmail: string;
|
||||||
|
companyName: string;
|
||||||
|
workspace: string;
|
||||||
|
gstNumber: string;
|
||||||
|
modalteam = false;
|
||||||
|
modaluser = false;
|
||||||
|
modalguest = false;
|
||||||
|
allworkmodal = false;
|
||||||
|
allworkspacedata;
|
||||||
|
alluser;
|
||||||
|
allguest;
|
||||||
|
allwdata;
|
||||||
|
public teamForm: FormGroup;
|
||||||
|
public userForm: FormGroup;
|
||||||
|
public guestForm: FormGroup;
|
||||||
|
public entryForm: FormGroup;
|
||||||
|
constructor(private router: Router,
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private userProfileService: UserProfileService,
|
||||||
|
private userInfoService: UserInfoService,
|
||||||
|
private _fb: FormBuilder,
|
||||||
|
private toastr: ToastrService,
|
||||||
|
private mywork: MyworkspaceService) { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
//addteam
|
||||||
|
this.teamForm = this._fb.group({
|
||||||
|
name: [null, [Validators.required]],
|
||||||
|
});
|
||||||
|
//add user
|
||||||
|
this.userForm = this._fb.group({
|
||||||
|
email: [null, [Validators.required, Validators.pattern("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")]],
|
||||||
|
});
|
||||||
|
//add guest
|
||||||
|
this.guestForm = this._fb.group({
|
||||||
|
email: [null, [Validators.required, Validators.pattern("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")]],
|
||||||
|
access_duration: [null, [Validators.required]],
|
||||||
|
})
|
||||||
|
this.getUserAccount();
|
||||||
|
this.getUserRoles();
|
||||||
|
this.getallmyworkspace();
|
||||||
|
this.getalluser();
|
||||||
|
this.getallguest();
|
||||||
|
}
|
||||||
|
getUserAccount() {
|
||||||
|
this.userProfileService.getUserAccountDetails().subscribe(resp => {
|
||||||
|
this.sys_account = resp;
|
||||||
|
console.log("array", this.sys_account);
|
||||||
|
}, err => { console.log(err); }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
addUsers() {
|
||||||
|
this.modaluser = true;
|
||||||
|
//this.router.navigate(["../users"], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
manage(id: any) {
|
||||||
|
this.router.navigate(["../manageteam/" + id], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
goToResetPassword() {
|
||||||
|
this.router.navigate(["../passwordreset"], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
|
||||||
|
roles: string[]
|
||||||
|
role: string;
|
||||||
|
getUserRoles() {
|
||||||
|
const role = this.userInfoService.getRoles();
|
||||||
|
console.log('roles = ', role);
|
||||||
|
|
||||||
|
// if(role !== null) {
|
||||||
|
// this.roles = role.split(',');
|
||||||
|
// }
|
||||||
|
this.role = role;
|
||||||
|
console.log(this.role);
|
||||||
|
}
|
||||||
|
|
||||||
|
isAdmin(): boolean {
|
||||||
|
const role: string = this.userInfoService.getRoles();
|
||||||
|
if (role.includes('ADMIN')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
addteam() {
|
||||||
|
this.modalteam = true;
|
||||||
|
}
|
||||||
|
addguest() {
|
||||||
|
this.modalguest = true;
|
||||||
|
}
|
||||||
|
getalluser() {
|
||||||
|
this.mywork.getalluser().subscribe((data) => {
|
||||||
|
this.alluser = data;
|
||||||
|
console.log(this.alluser);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getallguest() {
|
||||||
|
this.mywork.getallguest().subscribe((data) => {
|
||||||
|
this.allguest = data;
|
||||||
|
console.log(this.allguest);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getallmyworkspace() {
|
||||||
|
this.mywork.getall().subscribe((data) => {
|
||||||
|
this.allworkspacedata = data;
|
||||||
|
console.log(this.allworkspacedata);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onCreateuser() {
|
||||||
|
let email = this.userForm.value.email;
|
||||||
|
console.log(email);
|
||||||
|
this.mywork.adduser(this.userForm.value.email).subscribe((data) => {
|
||||||
|
this.mywork.storeEmail(email);
|
||||||
|
console.log(data);
|
||||||
|
if (data) {
|
||||||
|
this.toastr.success('Email Send successfully');
|
||||||
|
}
|
||||||
|
this.getalluser();
|
||||||
|
}, (error) => {
|
||||||
|
console.log(error);
|
||||||
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
|
this.toastr.success(error.error.text);
|
||||||
|
}
|
||||||
|
if (error.status >= 400 && error.status <= 499) {
|
||||||
|
this.toastr.error(error.error.message);
|
||||||
|
}
|
||||||
|
if (error.status >= 500 && error.status <= 599) {
|
||||||
|
this.toastr.error("Server Error");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.modaluser = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
onCreateguest() {
|
||||||
|
this.mywork.addguest(this.guestForm.value.email, this.guestForm.value.access_duration).subscribe((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data) {
|
||||||
|
this.toastr.success('Email Send successfully');
|
||||||
|
}
|
||||||
|
this.getallguest();
|
||||||
|
}, (error) => {
|
||||||
|
console.log(error);
|
||||||
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
|
this.toastr.success(error.error.text);
|
||||||
|
}
|
||||||
|
if (error.status >= 400 && error.status <= 499) {
|
||||||
|
this.toastr.error(error.error.message);
|
||||||
|
}
|
||||||
|
if (error.status >= 500 && error.status <= 599) {
|
||||||
|
this.toastr.error("Server Error");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.modalguest = false;
|
||||||
|
}
|
||||||
|
oncreateteam() {
|
||||||
|
this.modalteam = false;
|
||||||
|
this.mywork.addteam(this.teamForm.value).subscribe((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data) {
|
||||||
|
this.toastr.success('Team Added successfully');
|
||||||
|
}
|
||||||
|
this.getallmyworkspace();
|
||||||
|
}, (error) => {
|
||||||
|
console.log('Error in adding data...', error);
|
||||||
|
if (error) {
|
||||||
|
this.toastr.error('Not added Getting Some Error');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
allworksapce() {
|
||||||
|
this.allworkmodal = true;
|
||||||
|
this.mywork.getallworkspace().subscribe((data) => {
|
||||||
|
this.allwdata = data;
|
||||||
|
console.log(data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
copyInputMessage(inputElement) {
|
||||||
|
inputElement.select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
inputElement.setSelectionRange(0, 0);
|
||||||
|
|
||||||
|
if (inputElement.setSelectionRange) {
|
||||||
|
this.toastr.success("Link Copy Succesfully");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
|
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { ApiRequestService } from 'src/app/services/api/api-request.service';
|
||||||
|
import baseUrl from 'src/app/services/api/helper';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class MyworkspaceService {
|
||||||
|
public localStorage: Storage = localStorage;
|
||||||
|
constructor(private _http: HttpClient,private apiRequest: ApiRequestService) { }
|
||||||
|
public add(r: any){
|
||||||
|
return this._http.post(`${baseUrl}/api/menu-register`, r);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getall(){
|
||||||
|
return this._http.get(`${baseUrl}/Workspace_team/SecTeam/AccountId`);
|
||||||
|
}
|
||||||
|
public getalluser(){
|
||||||
|
return this._http.get(`${baseUrl}/User_workSpace/GetAllUser`);
|
||||||
|
}
|
||||||
|
public getallguest(){
|
||||||
|
return this._http.get(`${baseUrl}/User_workSpace/GetAllGuest`);
|
||||||
|
}
|
||||||
|
public adduser(email:any){
|
||||||
|
let params: HttpParams = new HttpParams();
|
||||||
|
params = params.append("email", email);
|
||||||
|
return this._http.post(`${baseUrl}/api/userviaadmin`,params);
|
||||||
|
}
|
||||||
|
storeEmail(email: string) {
|
||||||
|
this.localStorage.setItem("registeredEmail", email);
|
||||||
|
}
|
||||||
|
//Store userinfo from session storage
|
||||||
|
|
||||||
|
//Get email from session storage ( WILL REMOVE AFTER REGISTER)
|
||||||
|
getStoredEmail(): string | null {
|
||||||
|
try {
|
||||||
|
let email: string = this.localStorage.getItem(
|
||||||
|
"registeredEmail"
|
||||||
|
);
|
||||||
|
if (email) {
|
||||||
|
return email;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adduserdetails(data:any,token:any):Observable<any>{
|
||||||
|
return this._http.post(`${baseUrl}/api/admin/adduser/${token}`,data);
|
||||||
|
}
|
||||||
|
|
||||||
|
addguest(email:any,duration:any){
|
||||||
|
let params: HttpParams = new HttpParams();
|
||||||
|
params = params.append("email", email);
|
||||||
|
params=params.append("access_duration",duration)
|
||||||
|
return this._http.post(`${baseUrl}/api/guest_via_admin`,params);
|
||||||
|
}
|
||||||
|
|
||||||
|
addguestdetails(data:any,token:any):Observable<any>{
|
||||||
|
return this._http.post(`${baseUrl}/api/admin/addguest/${token}`,data);
|
||||||
|
}
|
||||||
|
addteam(data:any){
|
||||||
|
return this._http.post(`${baseUrl}/Workspace_team/SecTeam`,data);
|
||||||
|
}
|
||||||
|
public getallteammeme(id:any){
|
||||||
|
return this._http.get(`${baseUrl}/User_workSpace/GetAllMember/${id}`);
|
||||||
|
}
|
||||||
|
getallusertosameaccid(){
|
||||||
|
return this._http.get(`${baseUrl}/User_workSpace/GetAll/AccountId`);
|
||||||
|
}
|
||||||
|
addteammem(id:any,user_id:any,data:any){
|
||||||
|
return this._http.post(`${baseUrl}/User_workSpace/add_team/${id}/${user_id}`,data);
|
||||||
|
}
|
||||||
|
getallworkspace(){
|
||||||
|
return this._http.get(`${baseUrl}/Workspace_workspace/FindByaccount`);
|
||||||
|
}
|
||||||
|
addsecworkspaceuser(usrid:any,id:any,data:any,){
|
||||||
|
return this._http.post(`${baseUrl}/workspace/secworkspaceuser/add_workspace/users/${usrid}/${id}`,data);
|
||||||
|
}
|
||||||
|
addsecworkteam(pid:any,tid:any,data:any){
|
||||||
|
return this._http.post(`${baseUrl}/workspace/secworkspaceuser/addteam/${pid}/${tid}`,data);
|
||||||
|
}
|
||||||
|
getallsecworkspace(id:any):Observable<any>{
|
||||||
|
return this._http.get(`${baseUrl}/workspace/secworkspaceuser/get_by_projectid/${id}`);
|
||||||
|
}
|
||||||
|
// public getById(id: any){
|
||||||
|
// return this._http.get(`${baseUrl}/api/menu-register/${id}`);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public update(id:any, reg:any){
|
||||||
|
// return this._http.put(`${baseUrl}/api/menu-register/${id}`, reg);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public deleteById(id: any){
|
||||||
|
// return this._http.delete(`${baseUrl}/api/menu-register/${id}`);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////project users
|
||||||
|
|
||||||
|
addprojectuser(userId: any, projectId: any, duration: any, role: string):Observable<any> {
|
||||||
|
const params = new HttpParams().set('role', role);
|
||||||
|
return this._http.post(`${baseUrl}/workspace/secworkspaceuser/add_workspace/users/${userId}/${projectId}/${duration}`, {}, { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
///for team
|
||||||
|
public addprojectteam(projectId:any,teamId:any){
|
||||||
|
return this._http.post(`${baseUrl}/workspace/secworkspaceuser/addteam/${projectId}/${teamId}`, {});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -41,10 +41,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="clr-col-md-4 clr-col-sm-12">
|
<div class="clr-col-md-4 clr-col-sm-12">
|
||||||
<label for="name">Confirm New Password<span class="required-field">*</span></label>
|
<label for="name">Confirm New Password<span class="required-field">*</span></label>
|
||||||
<input type="password" class="clr-input" formControlName="confirm_passwordS">
|
<input type="password" class="clr-input" formControlName="confirm_password">
|
||||||
<div *ngIf="submitted && entryForm.controls.confirm_passwordS.errors" class="error_mess">
|
<div *ngIf="submitted && entryForm.controls.confirm_password.errors" class="error_mess">
|
||||||
<div *ngIf="entryForm.controls.confirm_passwordS.errors.required" class="error_mess">* Confirm Password is required</div>
|
<div *ngIf="entryForm.controls.confirm_password.errors.required" class="error_mess">* Confirm Password is required</div>
|
||||||
<div *ngIf="entryForm.controls.confirm_passwordS.errors.confirmedValidator" class="error_mess">* Password and Confirm Password must be match.</div>
|
<div *ngIf="entryForm.controls.confirm_password.errors.confirmedValidator" class="error_mess">* Password and Confirm Password must be match.</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -52,7 +52,7 @@ export class UsermaintanceaddComponent implements OnInit {
|
|||||||
email:['',[Validators.required,Validators.email]],
|
email:['',[Validators.required,Validators.email]],
|
||||||
mob_no:['',[Validators.required]],
|
mob_no:['',[Validators.required]],
|
||||||
new_password:['',[Validators.required,Validators.minLength(6)]],
|
new_password:['',[Validators.required,Validators.minLength(6)]],
|
||||||
confirm_passwordS:['',[Validators.required]],
|
confirm_password:['',[Validators.required]],
|
||||||
usrGrpId:['',[Validators.required]],
|
usrGrpId:['',[Validators.required]],
|
||||||
account_id:1,
|
account_id:1,
|
||||||
accesstype:['',[Validators.required]],
|
accesstype:['',[Validators.required]],
|
||||||
@ -76,7 +76,7 @@ export class UsermaintanceaddComponent implements OnInit {
|
|||||||
//usrGrp: this._fb.array([this.user()]),
|
//usrGrp: this._fb.array([this.user()]),
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
validator: ConfirmedValidator('new_password', 'confirm_passwordS')
|
validator: ConfirmedValidator('new_password', 'confirm_password')
|
||||||
});
|
});
|
||||||
this.usergrp();
|
this.usergrp();
|
||||||
this.getdata();
|
this.getdata();
|
||||||
|
|||||||
@ -112,4 +112,37 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Token Registery -->
|
||||||
|
<div class="clr-col-md-3" style="width: 300px ;">
|
||||||
|
<div class="card" (click)="goTokenRegistery()"
|
||||||
|
style="border-left: none; border-right: none; border-top: none;">
|
||||||
|
|
||||||
|
<div class="card-header" style="padding-bottom: 0px;">
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-12">
|
||||||
|
<clr-icon shape="cog"></clr-icon>
|
||||||
|
</div>
|
||||||
|
</div> <br>
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-12">
|
||||||
|
<b class="word" id="word" title="Token Registery" style="color:#e98585">{{ 'TOKEN_REGISTERY' |
|
||||||
|
translate
|
||||||
|
}}</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-12">
|
||||||
|
<div class="card-title1" id="word">
|
||||||
|
<b style="font-size: 15px;" class="p2" [title]="">{{ 'TOKEN_REGISTERY_DESCRIPTION' | translate
|
||||||
|
}}</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -77,6 +77,10 @@ export class SetupiconComponent implements OnInit {
|
|||||||
this.router.navigate(['/cns-portal/apiregistery'], { relativeTo: this.route });
|
this.router.navigate(['/cns-portal/apiregistery'], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goTokenRegistery() {
|
||||||
|
this.router.navigate(['/cns-portal/tokenregistery'], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// mc;
|
// mc;
|
||||||
// me;
|
// me;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user