From 1e9f6c6cdd5a57165616083c50bfe16e18f4af76 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Date: Mon, 1 Sep 2025 11:49:27 +0530 Subject: [PATCH] workspace --- .../login/addguest/addguest.component.html | 75 ++--- .../login/addguest/addguest.component.ts | 2 +- .../forgotresetpassword1.component.html | 8 +- .../forgotresetpassword1.component.ts | 36 +- .../login/login-page/login_environment.ts | 18 +- .../myworkspace/myworkspace.component.css | 85 +++++ .../myworkspace/myworkspace.component.css.map | 1 + .../myworkspace/myworkspace.component.html | 309 ++++++++++++++++++ .../myworkspace/myworkspace.component.scss | 94 ++++++ .../myworkspace/myworkspace.component.spec.ts | 25 ++ .../myworkspace/myworkspace.component.ts | 206 ++++++++++++ .../admin/myworkspace/myworkspace.service.ts | 115 +++++++ .../usermaintanceadd.component.html | 8 +- .../usermaintanceadd.component.ts | 4 +- .../setupicon/setupicon.component.html | 33 ++ .../builder/setupicon/setupicon.component.ts | 4 + 16 files changed, 947 insertions(+), 76 deletions(-) create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css.map create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.html create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.scss create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.spec.ts create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.ts create mode 100644 frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.service.ts diff --git a/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.html b/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.html index 9709774..b5e25a4 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.html +++ b/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.html @@ -7,7 +7,7 @@
-
+ cloudnSure @@ -15,10 +15,10 @@ - + - -
-
-

Welcome to cloudnsure!

-
You're signing up as {{email}}
-
-
-
- -
+
+

Welcome to cloudnsure!

+
You're signing up as {{email}} +
+
+ +
+ +
First Name is required
-
-
-
- -
+
+
+ +
Last Name is required
-
-
- -
+
+ +
Mobile Number is required
Mobile Number is 10 numbers
-
-
+
+
+ placeholder="Enter New Password" formControlName="password" />
@@ -119,24 +120,18 @@

+ placeholder="Re-Enter New Password" formControlName="confirm_password" /> -
-
Password is required.
-
Password and Confirm Password must be match.
+
Password is required.
+
Password and Confirm Password must be match.
- - -
-

User Info Is Added Please Login

-

Wrong account? Log in instead.

-
+ + +
+

User Info Is Added Please Login

+

Wrong account? Log in instead.

- - - - - - +
\ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.ts b/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.ts index 655c889..4a01c87 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/login/addguest/addguest.component.ts @@ -51,7 +51,7 @@ export class AddguestComponent implements OnInit { last_name: ['', Validators.required], mob_no: ['', [Validators.required,Validators.minLength(10)]], password: ['',[ Validators.required, Validators.minLength(6), Validators.maxLength(40)]], - confirm_passwordS: ['', Validators.required], + confirm_password: ['', Validators.required], }, ); } diff --git a/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.html b/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.html index 42fa1be..86869d4 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.html +++ b/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.html @@ -119,12 +119,12 @@

+ placeholder="Re-Enter New Password" formControlName="confirm_password"/> -
-
Password is required.
-
Password and Confirm Password must be match.
+
Password is required.
+
Password and Confirm Password must be match.
diff --git a/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.ts b/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.ts index 6e1b397..66b459e 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/login/forgotresetpassword1/forgotresetpassword1.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; +import { ToastrService } from 'ngx-toastr'; import { MyworkspaceService } from 'src/app/services/admin/myworkspace.service'; @Component({ @@ -9,14 +10,14 @@ import { MyworkspaceService } from 'src/app/services/admin/myworkspace.service'; styleUrls: ['./forgotresetpassword1.component.scss'] }) export class Forgotresetpassword1Component implements OnInit { - public form: FormGroup; + public form: FormGroup; submitted = false; passchange; newpHide: boolean = true; newIcon: string = "eye"; newShapeChanger() { this.newpHide = !this.newpHide; - if(this.newpHide){ + if (this.newpHide) { this.newIcon = 'eye' } else { this.newIcon = 'eye-hide' @@ -26,7 +27,7 @@ export class Forgotresetpassword1Component implements OnInit { conIcon: string = "eye"; comfShapeChanger() { this.cpHide = !this.cpHide; - if(this.cpHide){ + if (this.cpHide) { this.conIcon = 'eye' } else { this.conIcon = 'eye-hide' @@ -37,7 +38,8 @@ export class Forgotresetpassword1Component implements OnInit { token; constructor(private _fb: FormBuilder, private route: ActivatedRoute, - private mywork:MyworkspaceService) { } + private mywork: MyworkspaceService, + private toastr: ToastrService,) { } ngOnInit(): void { this.email = this.mywork.getStoredEmail(); @@ -49,19 +51,21 @@ export class Forgotresetpassword1Component implements OnInit { { first_name: ['', Validators.required], last_name: ['', Validators.required], - mob_no: ['', [Validators.required,Validators.minLength(10)]], - password: ['',[ Validators.required, Validators.minLength(6), Validators.maxLength(40)]], - confirm_passwordS: ['', Validators.required], + mob_no: ['', [Validators.required, Validators.minLength(10)]], + password: ['', [Validators.required, Validators.minLength(6), Validators.maxLength(40)]], + confirm_password: ['', Validators.required], - }, ); + },); } - onsubmit(){ -this.mywork.adduserdetails(this.form.value,this.token).subscribe((data)=>{ - console.log(data); - this.passchange=data; - console.log('success ', data); - },(err) => { - console.log('failure ', err); -}) + onsubmit() { + this.mywork.adduserdetails(this.form.value, this.token).subscribe((data) => { + console.log(data); + this.passchange = data; + this.toastr.success('Email Send successfully'); + console.log('success ', data); + }, (err) => { + this.toastr.error("Server Error"); + console.log('failure ', err); + }) } } diff --git a/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..c6eaeef 100644 --- a/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts @@ -2,14 +2,14 @@ export const LoginEnvironment = { - "templateNo": "", - "loginHeading": "", - "loginHeading2": "", - "isSignup": "", - "loginSignup": " ", - "loginSignup2": "", - "loginForgotpass": "", - "loginImage": "", - "loginImageURL": "" + "templateNo": "Template 1", + "loginHeading": "Welcome", + "loginHeading2": "io8.dev1", + "isSignup": "true", + "loginSignup": "Use your ID to sign in OR ", + "loginSignup2": "create one now", + "loginForgotpass": "FORGOT PASSWORD?", + "loginImage": "[]", + "loginImageURL": "null" } diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css new file mode 100644 index 0000000..8f4c16f --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css @@ -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 */ \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css.map b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.css.map new file mode 100644 index 0000000..768da17 --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/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"} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.html b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.html new file mode 100644 index 0000000..c39b264 --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.html @@ -0,0 +1,309 @@ +
+

Organization and Workspaces

+
+ +
+ + + + + + + + + + + + + + + switch + +
Organization: {{ sys_account.companyName }}
Account Id: {{ sys_account.gstNumber }}
Selected Workspace: {{sys_account.workspace }}
+ +
+ + + + + + + + Loading ... + + + No + + + Name + + + Account Type + + + Status + + + Actions + + + {{i+1}} + + {{user.fullName}}
{{user.username}}{{user.email}}
+ + + {{user.status}} + +
+ + + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+
+
+ + + + + + Loading ... + + + No + + + Name + + + Account Type + + + Status + + + Access Till + + + Actions + + + {{i+1}} + + {{user.fullName}}
{{user.username}}{{user.email}}
+ {{user.roles[0].description}} + {{user.status}} + {{user.access_duration}} + + +
+ + + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+
+
+ + + + + + Loading ... + + + No + + + Team Name + + + Owner + + + Count + + + Members + + + + {{i+1}} + {{user.name}} + {{user.owner_id}} + 3 +
+ +
+
+ +
+ + + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+
+
+ +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.scss b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.scss new file mode 100644 index 0000000..9568abf --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.scss @@ -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; + +} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.spec.ts b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.spec.ts new file mode 100644 index 0000000..46b827c --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MyworkspaceComponent } from './myworkspace.component'; + +describe('MyworkspaceComponent', () => { + let component: MyworkspaceComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ MyworkspaceComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(MyworkspaceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.ts b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.ts new file mode 100644 index 0000000..283c78d --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.component.ts @@ -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"); + } + } +} diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.service.ts b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.service.ts new file mode 100644 index 0000000..ae0913b --- /dev/null +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/myworkspace/myworkspace.service.ts @@ -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{ + 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{ + 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{ + 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 { + 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}`, {}); +} +} diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.html b/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.html index 44bcb19..3f73f06 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.html +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.html @@ -41,10 +41,10 @@
- -
-
* Confirm Password is required
-
* Password and Confirm Password must be match.
+ +
+
* Confirm Password is required
+
* Password and Confirm Password must be match.
diff --git a/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.ts b/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.ts index 02ced90..a7522e4 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/admin/usermaintanceadd/usermaintanceadd.component.ts @@ -52,7 +52,7 @@ export class UsermaintanceaddComponent implements OnInit { email:['',[Validators.required,Validators.email]], mob_no:['',[Validators.required]], new_password:['',[Validators.required,Validators.minLength(6)]], - confirm_passwordS:['',[Validators.required]], + confirm_password:['',[Validators.required]], usrGrpId:['',[Validators.required]], account_id:1, accesstype:['',[Validators.required]], @@ -76,7 +76,7 @@ export class UsermaintanceaddComponent implements OnInit { //usrGrp: this._fb.array([this.user()]), }, { - validator: ConfirmedValidator('new_password', 'confirm_passwordS') + validator: ConfirmedValidator('new_password', 'confirm_password') }); this.usergrp(); this.getdata(); diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.html b/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.html index d025a47..972d75d 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.html +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.html @@ -112,4 +112,37 @@ + +
+
+ +
+
+
+ +
+

+
+
+ {{ 'TOKEN_REGISTERY' | + translate + }} +
+
+ +
+
+
+ {{ 'TOKEN_REGISTERY_DESCRIPTION' | translate + }} +
+
+
+
+
+
+ + +
\ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.ts index 48d7d30..4e62715 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/setupicon/setupicon.component.ts @@ -77,6 +77,10 @@ export class SetupiconComponent implements OnInit { this.router.navigate(['/cns-portal/apiregistery'], { relativeTo: this.route }); } + goTokenRegistery() { + this.router.navigate(['/cns-portal/tokenregistery'], { relativeTo: this.route }); + } + // mc; // me;