diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.html deleted file mode 100644 index 0c87d72..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.html +++ /dev/null @@ -1,417 +0,0 @@ - -
-
-
-

Ad10

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - Description - - - - Active - - - - - - - - Action - - - - - -{{user.name }} - - - - - - -{{user.active }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.ts deleted file mode 100644 index aebc753..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.component.ts +++ /dev/null @@ -1,314 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Ad10service} from './Ad10.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Ad10cardvariable } from './Ad10_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Ad10', - templateUrl: './Ad10.component.html', - styleUrls: ['./Ad10.component.scss'] -}) -export class Ad10Component implements OnInit { - cardButton = Ad10cardvariable.cardButton; - cardmodeldata = Ad10cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Ad10cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Ad10_formCode' -tableName = 'Ad10'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Ad10service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -description : [null], - -active : [true], - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Ad10_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - -// payment code start - checkoutModal = false; - checkout(){ this.checkoutModal = true; } -paytmPay(){ - this.checkoutModal = false; console.log('Paytm Payment started'); - this.mainService.paytmPay(this.entryForm.value).subscribe(data=>{ - console.log(data); this.onSubmit(); },(error)=>{ - console.log(error); }); } orderData = { - amount: '', }; - razorPay(){ - this.checkoutModal = false; - this.orderData.amount = this.entryForm.value.amount; - console.log('Razorpay Payment started'); - this.mainService.razorPay(this.orderData).subscribe(data=>{ - console.log(data); this.onSubmit(); },(error)=>{ - console.log(error); }); } // payment code end - -// updateaction -} - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.service.ts deleted file mode 100644 index eac44d4..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Ad10service{ - private baseURL = "Ad10/Ad10" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - -// payment code start - paytmPay(data: any): Observable { - const url = `payment/start`; return this.apiRequest.post(url, data); - } -razorPay(orderData: any): Observable { - const url = `payment/razorpay/create-order`; - return this.apiRequest.post(url, orderData); } // payment code end - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10_cardvariable.ts deleted file mode 100644 index 1821b1a..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad10/Ad10_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Ad10cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.html deleted file mode 100644 index 760b3cc..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.html +++ /dev/null @@ -1,537 +0,0 @@ - -
-
-
-

Ad6

-
-
- - - -
-
- - - - Loading ... - -
{{error}}
-
- - Name - - - - description - - - - country - - - - state - - - - district - - - - - - Action - - - - - - {{user.name }} - - - {{user.description }} - - - {{user. countryidentifier}} - - - {{user.state }} - - - {{user.district }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
- File Preview -
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.ts deleted file mode 100644 index 1f089fb..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.component.ts +++ /dev/null @@ -1,417 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Ad6service } from './Ad6.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Ad6cardvariable } from './Ad6_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Ad6', - templateUrl: './Ad6.component.html', - styleUrls: ['./Ad6.component.scss'] -}) -export class Ad6Component implements OnInit { - cardButton = Ad6cardvariable.cardButton; - cardmodeldata = Ad6cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Ad6cardvariable.cardButton; - cardmodal; changeView() { - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected: any = {}; - modaldelete = false; - modalEdit = false; - modalAdd = false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine: any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Ad6_formCode' - tableName = 'Ad6'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, - private userInfoService: UserInfoService, - private mainService: Ad6service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; - // component button - ngOnInit(): void { - if (this.cardmodeldata !== '') { - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole = this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - name: [null], - - description: [null], - - country: [null], - - state: [null], - - - district: [null], - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Ad6_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - this.getallcountry(); - - - - if (this.countrydefault) { - // Listen for product changes to auto-fill description - - this.entryForm.get('country')?.valueChanges.subscribe(name => { - if (name && this.selectcountry) { - - const found = this.selectcountry.find(p => p.name === name); - - - - console.log('found is ', found); - - // Auto-fill price when product is selected - if (found && found.default_field) { - this.entryForm.patchValue({ default_field: found.default_field_link }); - } else { - this.entryForm.patchValue({ default_field: null }); - } - - } - }); - } - // Listen for country changes - - - this.entryForm.get('country')?.valueChanges.subscribe((item) => { - - - if (item) { - this.dependet2state(item); - } else { - this.statedependentData = []; - this.entryForm.get('state')?.setValue(null); // clear state - } - }); - - - - // Listen for country changes - - - this.entryForm.get('state')?.valueChanges.subscribe((item) => { - - - if (item) { - this.dependet2district(item); - } else { - this.districtdependentData = []; - this.entryForm.get('district')?.setValue(null); // clear state - } - }); - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; - this.product = [...this.product].reverse(); if (this.product.length == 0) { - this.error = "No Data Available" - } - }, (error) => { - console.log(error); - if (error) { - this.error = "Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - // Dependemt Dropdown field start - this.dependet2state(row.dependentDD); - // Dependemt Dropdown field end - - // Dependemt Dropdown field start - this.dependet2district(row.dependentDD); - // Dependemt Dropdown field end - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete = true; - } - delete(id) { - this.modaldelete = false; - console.log("in delete " + id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - onCreate() { - this.modalAdd = false; - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { - this.modalAdd = true; this.submitted = false; - - } - submitted = false; - onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - } this.onCreate(); - - } - - - countrydefault = false - selectcountry; - getallcountry() { - this.mainService.getAllcountry().subscribe(data => { - this.selectcountry = data; - console.log(data); - }, (error) => { console.log(error); }); - } - - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - countrySummary: any[] = []; - countrytotal; - iscountryorder = false; - /** - * Add selected product to order summary - */ - addcountryOrder() { - const formValue = this.entryForm.value; - if (!formValue.country) { - this.toastr.error('Please select country'); - return; - } - // Get description from master (selectcountry) - - - - - if (this.selectcountry && Array.isArray(this.selectcountry)) { - - - const found = this.selectcountry.find(p => p.name === formValue.country); - - - - - } - const line = this.countrySummary.length + 1; - const orderItem = { - line: line, - - // unitPrice: Number(formValue.price), - // quantity: Number(formValue.quantity), - // total: Number(formValue.price) * Number(formValue.quantity) - }; - this.countrySummary.push(orderItem); - - this.countrytotal = ''; - } - - /** - * Remove item from order summary by index - */ - removecountryOrder(index: number) { - this.countrySummary.splice(index, 1); - // Recalculate line numbers - this.countrySummary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getcountrySubtotal(): number { - return this.countrySummary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getcountryGST(): number { - return this.getcountrySubtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getcountryGrandTotal(): number { - return this.getcountrySubtotal() + this.getcountryGST(); - - } - // ================== ORDER SUMMARY LOGIC END ================== - - - // Dependemt Dropdown field start - - - statedependentData: any; - dependet2state(item) { - this.mainService.getstateDependent(item).subscribe((data) => { - console.log(data); - this.statedependentData = data; - }, (error) => { console.log(error); }); - } - - - // DependemtDropdown field end - - // Dependemt Dropdown field start - - - districtdependentData: any; - dependet2district(item) { - this.mainService.getdistrictDependent(item).subscribe((data) => { - console.log(data); - this.districtdependentData = data; - }, (error) => { console.log(error); }); - } - - - // DependemtDropdown field end - - // updateaction -} - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.service.ts deleted file mode 100644 index fb34d50..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6.service.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Ad6service{ - private baseURL = "Ad6/Ad6" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -getAllcountry(): Observable { -return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - - - - getstateDependent(field: string): Observable { - return this.apiRequest.get("State_ListFilter1/State_ListFilter11/" + field); - } - - - - - - getdistrictDependent(field: string): Observable { - return this.apiRequest.get("District_ListFilter1/District_ListFilter11/" + field); - } - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6_cardvariable.ts deleted file mode 100644 index a7602db..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad6/Ad6_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Ad6cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.html deleted file mode 100644 index 0d98c81..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.html +++ /dev/null @@ -1,421 +0,0 @@ - -
-
-
-

Ad7

-
-
- - - - - - - - - - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - - - - - - - Action - - - - - -{{user.name }} - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.ts deleted file mode 100644 index 7c15c86..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.component.ts +++ /dev/null @@ -1,379 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Ad7service} from './Ad7.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Ad7cardvariable } from './Ad7_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Ad7', - templateUrl: './Ad7.component.html', - styleUrls: ['./Ad7.component.scss'] -}) -export class Ad7Component implements OnInit { - cardButton = Ad7cardvariable.cardButton; - cardmodeldata = Ad7cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Ad7cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Ad7_formCode' -tableName = 'Ad7'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Ad7service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - public insertFormButton_Field2: FormGroup; - - - public insertFormButton_Field: FormGroup; - - - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - - - - - - - - - - - - - }); // component_button200 -// inser code start - this.insertFormButton_Field2 = this._fb.group({ - description: 'textarea', - name: '', - }); - - // insert code end - -// inser code start - this.insertFormButton_Field = this._fb.group({ - active: 'toggle_switch', - description: 'textarea', - name: 'text', - }); - - // insert code end - - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Ad7_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - - - -// updateaction - -// insert button - - -modalInsertButton_Field2 = false; -goToInsertButton_Field2() { - this.modalInsertButton_Field2=true; - } -onSubmitInsertButton_Field2() { - console.log(this.insertFormButton_Field2.value); - this.submitted=true; - if (this.insertFormButton_Field2.invalid) { - return; - } - this.onInsertButton_Field2(); -} -onInsertButton_Field2() { - this.modalInsertButton_Field2=false; - this.mainService.insertButton_Field2Support(this.insertFormButton_Field2.value).subscribe(data => { - console.log('After add',data) - if (data.status >=200 && data.status <=209) { - this.toastr.success('Added successfully'); - } -if (data && data.id != null) { - this.toastr.success('Added successfully'); - } this.ngOnInit(); - },(error) => { - console.error(error); - if ( error.status >= 200 && error.status <= 299) { - this.toastr.success("Update Successfully"); - } - if ( error.status >= 400 && error.status <= 499) { - this.toastr.error("Update Failed"); - } - if ( error.status >= 500 && error.status <= 599) { - this.toastr.error("Server Error"); - } - this.ngOnInit(); - }); - this.insertFormButton_Field2.reset(); - } -// insert buuton code end - - - -// insert button - - -modalInsertButton_Field = false; -goToInsertButton_Field() { - this.modalInsertButton_Field=true; - } -onSubmitInsertButton_Field() { - console.log(this.insertFormButton_Field.value); - this.submitted=true; - if (this.insertFormButton_Field.invalid) { - return; - } - this.onInsertButton_Field(); -} -onInsertButton_Field() { - this.modalInsertButton_Field=false; - this.mainService.insertButton_FieldCountry(this.insertFormButton_Field.value).subscribe(data => { - console.log('After add',data) - if (data.status >=200 && data.status <=209) { - this.toastr.success('Added successfully'); - } -if (data && data.id != null) { - this.toastr.success('Added successfully'); - } this.ngOnInit(); - },(error) => { - console.error(error); - if ( error.status >= 200 && error.status <= 299) { - this.toastr.success("Update Successfully"); - } - if ( error.status >= 400 && error.status <= 499) { - this.toastr.error("Update Failed"); - } - if ( error.status >= 500 && error.status <= 599) { - this.toastr.error("Server Error"); - } - this.ngOnInit(); - }); - this.insertFormButton_Field.reset(); - } -// insert buuton code end - - -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.service.ts deleted file mode 100644 index 1ef2c02..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7.service.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Ad7service{ - private baseURL = "Ad7/Ad7" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - -// updateaction -// insert button code start -insertButton_Field2Support(Support: any): Observable { - return this.apiRequest.post(`Ad7/Ad7/Support_insert`, Support); -} - -// insert button code start -insertButton_FieldCountry(Country: any): Observable { - return this.apiRequest.post(`Ad7/Ad7/Country_insert`, Country); -} - -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7_cardvariable.ts deleted file mode 100644 index e211fcd..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad7/Ad7_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Ad7cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.html deleted file mode 100644 index 1615499..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.html +++ /dev/null @@ -1,619 +0,0 @@ - -
-
-
-

Ad8

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - - - - - - - description - - - - name - - - - - - - - - Action - - - - - -{{user.name }} - - - - - - - - -{{user.support?.description}} - - - -{{user.support?.name}} - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.ts deleted file mode 100644 index 6445dbe..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.component.ts +++ /dev/null @@ -1,478 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Ad8service} from './Ad8.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Ad8cardvariable } from './Ad8_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Ad8', - templateUrl: './Ad8.component.html', - styleUrls: ['./Ad8.component.scss'] -}) -export class Ad8Component implements OnInit { - cardButton = Ad8cardvariable.cardButton; - cardmodeldata = Ad8cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Ad8cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Ad8_formCode' -tableName = 'Ad8'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Ad8service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - public UpdateFormButtonupdate2: FormGroup; - - - public UpdateFormButtonUpdate: FormGroup; - - - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - - - - - -support: this.supportinitLinesForm(), - -childform: this._fb.array([this.initchildformForm()]), - - - - - - - - - - - - - }); // component_button200 -// inser code start - this.UpdateFormButtonupdate2 = this._fb.group({ - active: '', - description: '', - name: '', - }); - - // Update code end - -// inser code start - this.UpdateFormButtonUpdate = this._fb.group({ - description: '', - name: '', - }); - - // Update code end - - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Ad8_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - -supportinitLinesForm() { return this._fb.group({ - - - description: [null], - - - - name: [null], - - - -}); } - - -// one to many start - initchildformForm() { return this._fb.group({ - - - - active: [null], - - - - description: [null], - - - - name: [null], - - - -}); } -get childformcontrols() {return (this.entryForm.get("childform") as FormArray).controls; } -onAddchildform() { -(this.entryForm.get("childform")).push(this.initchildformForm()); } -onRemovechildform(index: number) { -(this.entryForm.get("childform")).removeAt(index); } - oneditchildform() { this.childformcomponents.push({ - - -active: "", - - - -description: "", - - - -name: "", - - - - }); } - deletechildformRow(index) { - this.childformcomponents.splice(index, 1); - } -childformcomponents; - // one to many end - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - -this.childformcomponents = row.childform; - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - - - - - - - -// updateaction - -// update button - - -modalUpdateButtonupdate2 = false; -goToUpdateButtonupdate2() { - this.modalUpdateButtonupdate2=true; - } -onSubmitUpdateButtonupdate2(id) { - console.log(this.UpdateFormButtonupdate2.value); - this.submitted=true; - if (this.UpdateFormButtonupdate2.invalid) { - return; - } - this.onUpdateButtonupdate2(id); -} -onUpdateButtonupdate2(id) { - this.modalUpdateButtonupdate2=false; - this.mainService.updateChildform(id,this.UpdateFormButtonupdate2.value).subscribe(data => { - console.log(data) - if (data.status >=200 && data.status <=209) { - this.toastr.success('Added successfully'); - } - this.ngOnInit(); - },(error) => { - console.error(error); - if ( error.status >= 200 && error.status <= 299) { - this.toastr.success("Update Successfully"); - } - if ( error.status >= 400 && error.status <= 499) { - this.toastr.error("Update Failed"); - } - if ( error.status >= 500 && error.status <= 599) { - this.toastr.error("Server Error"); - } - this.ngOnInit(); - }); - this.UpdateFormButtonupdate2.reset(); - } -// update buuton code end - - - -// update button - - -modalUpdateButtonUpdate = false; -goToUpdateButtonUpdate() { - this.modalUpdateButtonUpdate=true; - } -onSubmitUpdateButtonUpdate(id) { - console.log(this.UpdateFormButtonUpdate.value); - this.submitted=true; - if (this.UpdateFormButtonUpdate.invalid) { - return; - } - this.onUpdateButtonUpdate(id); -} -onUpdateButtonUpdate(id) { - this.modalUpdateButtonUpdate=false; - this.mainService.updateSupport(id,this.UpdateFormButtonUpdate.value).subscribe(data => { - console.log(data) - if (data.status >=200 && data.status <=209) { - this.toastr.success('Added successfully'); - } - this.ngOnInit(); - },(error) => { - console.error(error); - if ( error.status >= 200 && error.status <= 299) { - this.toastr.success("Update Successfully"); - } - if ( error.status >= 400 && error.status <= 499) { - this.toastr.error("Update Failed"); - } - if ( error.status >= 500 && error.status <= 599) { - this.toastr.error("Server Error"); - } - this.ngOnInit(); - }); - this.UpdateFormButtonUpdate.reset(); - } -// update buuton code end - - -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.service.ts deleted file mode 100644 index 30e6ea9..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8.service.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Ad8service{ - private baseURL = "Ad8/Ad8" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - -// updateaction -// update button code start -updateChildform(id: number,Childform: any): Observable { - return this.apiRequest.put(`Childform/Childform_update/`+ id, Childform); -} - -// update button code start -updateSupport(id: number,Support: any): Observable { - return this.apiRequest.put(`Support/Support_update/`+ id, Support); -} - -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8_cardvariable.ts deleted file mode 100644 index b377f58..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad8/Ad8_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Ad8cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.html deleted file mode 100644 index 77ced78..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.html +++ /dev/null @@ -1,420 +0,0 @@ - -
-
-
-

Ad9

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - - - - - Action - - - - - -{{user.name }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.ts deleted file mode 100644 index 65bcd67..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.component.ts +++ /dev/null @@ -1,282 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Ad9service} from './Ad9.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Ad9cardvariable } from './Ad9_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Ad9', - templateUrl: './Ad9.component.html', - styleUrls: ['./Ad9.component.scss'] -}) -export class Ad9Component implements OnInit { - cardButton = Ad9cardvariable.cardButton; - cardmodeldata = Ad9cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Ad9cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Ad9_formCode' -tableName = 'Ad9'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Ad9service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -approved_field_status : [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Ad9_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - -approved_field_tablename = 'Ad9' - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - this.serverData = []; - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - -// approve code - this.serverData = this.serverData.map((item) => { - item.tablename = this.approved_field_tablename; - return item; - }); this.serverData = this.serverData.map((item) => { - item.service_order_id = data.id; - return item; }); - console.log(this.serverData); - this.serverData.forEach((item) => { - this.mainService.create_approved(item).subscribe( - (data) => { console.log(data); }) - }) // approved code end - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - // approval code - serverData:any = []; - onAddLines() { - this.serverData.push({ formCode:"", - documentSeq:"", - approver:"", - actionType:"", -actionTaken:"", - comments:"", - actionedAt:"", - tablename:"", - service_order_id:"", }); } - onRemoveLines(index: number){ - this.serverData.splice(index, 1); - } - oneditAddLines() { - this.serverData.push({ - formCode:"", documentSeq:"", approver:"", - actionType:"", actionTaken:"", comments:"", - actionedAt:"", tablename:"", - service_order_id:"", }); } - oneditRemoveLines(index: number){ this.serverData.splice(index, 1); - } // approval code end - -// updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.service.ts deleted file mode 100644 index 9b477f1..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9.service.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Ad9service{ - private baseURL = "Ad9/Ad9" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - -// approve code - create_approved(data: any): Observable { - const _http = "billing/approval" + "/" + "add"; - return this.apiRequest.post(_http, data); } // approved code end - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9_cardvariable.ts deleted file mode 100644 index dca4e0f..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Ad9/Ad9_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Ad9cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.html deleted file mode 100644 index 3542316..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.html +++ /dev/null @@ -1,1380 +0,0 @@ - -
-
-
-

Adv1

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - ismale - - - - idfemale - - - - - - test1 - - - - - test2 - - - - - - - - - t1 - - - - - t2 - - - - - t4 - - - - - - - - - - - - - - - - - - - - - - - - - Action - - - - - -{{user.ismale }} - - -{{user.idfemale }} - - - - -{{user.test1}} - - - -{{user.test2}} - - - - - - - -{{user.t1}} - - - -{{user.t2}} - - - -{{user.t4}} - - - - - - - - - - - - - - - - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.ts deleted file mode 100644 index c6ec0e8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.component.ts +++ /dev/null @@ -1,957 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Adv1service} from './Adv1.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Adv1cardvariable } from './Adv1_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Adv1', - templateUrl: './Adv1.component.html', - styleUrls: ['./Adv1.component.scss'] -}) -export class Adv1Component implements OnInit { - cardButton = Adv1cardvariable.cardButton; - cardmodeldata = Adv1cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Adv1cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Adv1_formCode' -tableName = 'Adv1'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Adv1service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -ismale : [null], - -idfemale : [null], - - - -test1:[false], - - - -test2:[false], - - - - - -t1:[false], - - - -t2:[false], - - - -t4:[false], - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv1_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - - - - - - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - -FileDataImageupload_field: any[]; - selectedImageupload_field: any[]; - -FileDataImageupload_field2: any[]; - selectedImageupload_field2: any[]; - -FileDataAudio_field: any[]; - selectedAudio_field: any[]; - -FileDataAudio_field2: any[]; - selectedAudio_field2: any[]; - -FileDataVideo_field: any[]; - selectedVideo_field: any[]; - - -FileDataVideo_field2: any[]; - selectedVideo_field2: any[]; - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - this.selectedfileupload_field = []; - this.mainService.uploadfilegetByIdfileupload_field(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDatafileupload_field = uploaddata; - - }) - - this.selectedfileupload_field2 = []; - this.mainService.uploadfilegetByIdfileupload_field2(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDatafileupload_field2 = uploaddata; - - }) - - this.selectedimageupload_field = []; - this.mainService.uploadImageupload_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDataimageupload_field = uploaddata; - - }) - - this.selectedimageupload_field2 = []; - this.mainService.uploadImageupload_field2getById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDataimageupload_field2 = uploaddata; - - }) - - this.selectedaudio_field = []; - this.mainService.uploadAudio_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDataaudio_field = uploaddata; - - }) - - this.selectedaudio_field2 = []; - this.mainService.uploadAudio_field2getById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDataaudio_field2 = uploaddata; - - }) - - this.selectedvideo_field = []; - this.mainService.uploadVideo_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDatavideo_field = uploaddata; - - }) - - this.selectedvideo_field2 = []; - this.mainService.uploadVideo_field2getById(row.id,this.tableName).subscribe(uploaddata =>{ - console.log(uploaddata); - this.FileDatavideo_field2 = uploaddata; - - }) - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - - - - - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - -for (let i = 0; i < this.selectedfileupload_field.length; i++){ - - this.mainService.uploadfilefileupload_field(data.id,this.tableName,this.selectedfileupload_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedfileupload_field2.length; i++){ - - this.mainService.uploadfilefileupload_field2(data.id,this.tableName,this.selectedfileupload_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedimageupload_field.length; i++){ - - this.mainService.uploadImageupload_field(data.id,this.tableName,this.selectedimageupload_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedimageupload_field2.length; i++){ - - this.mainService.uploadImageupload_field2(data.id,this.tableName,this.selectedimageupload_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedaudio_field.length; i++){ - - this.mainService.uploadAudio_field(data.id,this.tableName,this.selectedaudio_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedaudio_field2.length; i++){ - - this.mainService.uploadAudio_field2(data.id,this.tableName,this.selectedaudio_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedvideo_field.length; i++){ - - this.mainService.uploadVideo_field(data.id,this.tableName,this.selectedvideo_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedvideo_field2.length; i++){ - - this.mainService.uploadVideo_field2(data.id,this.tableName,this.selectedvideo_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - -for (let i = 0; i < this.selectedfileupload_field.length; i++){ - - this.mainService.uploadfilefileupload_field(data.id,this.tableName,this.selectedfileupload_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedfileupload_field2.length; i++){ - - this.mainService.uploadfilefileupload_field2(data.id,this.tableName,this.selectedfileupload_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedimageupload_field.length; i++){ - - this.mainService.uploadImageupload_field(data.id,this.tableName,this.selectedimageupload_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedimageupload_field2.length; i++){ - - this.mainService.uploadImageupload_field2(data.id,this.tableName,this.selectedimageupload_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedaudio_field.length; i++){ - - this.mainService.uploadAudio_field(data.id,this.tableName,this.selectedaudio_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedaudio_field2.length; i++){ - - this.mainService.uploadAudio_field2(data.id,this.tableName,this.selectedaudio_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedvideo_field.length; i++){ - - this.mainService.uploadVideo_field(data.id,this.tableName,this.selectedvideo_field[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - -for (let i = 0; i < this.selectedvideo_field2.length; i++){ - - this.mainService.uploadVideo_field2(data.id,this.tableName,this.selectedvideo_field2[i]).subscribe(uploaddata =>{ - console.log(uploaddata); - }) -} - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - -this.FileDatafileupload_field = []; -this.selectedfileupload_field =[]; - -this.FileDatafileupload_field2 = []; -this.selectedfileupload_field2 =[]; - -this.FileDataImageupload_field = []; -this.selectedImageupload_field =[]; - -this.FileDataImageupload_field2 = []; -this.selectedImageupload_field2 =[]; - -this.FileDataAudio_field = []; -this.selectedAudio_field =[]; - -this.FileDataAudio_field2 = []; -this.selectedAudio_field2 =[]; - -this.FileDataVideo_field = []; -this.selectedVideo_field =[]; - -this.FileDataVideo_field2 = []; -this.selectedVideo_field2 =[]; - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} -updateismale (ismale : string): void { - this.entryForm.get('ismale').setValue(ismale); } - -updateismaleEdit(ismale : string): void { this.rowSelected.ismale = ismale } - ; - -updateidfemale (idfemale : string): void { - this.entryForm.get('idfemale').setValue(idfemale); } - -updateidfemaleEdit(idfemale : string): void { this.rowSelected.idfemale = idfemale } - ; - - - - - -filePreviewfileupload_field: string | ArrayBuffer | null = null; -FileDatafileupload_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedfileupload_field: File[]=[]; -public onFileChangedfileupload_field(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDatafileupload_field[index].uploadedfile_name = files[i].name; - this.selectedfileupload_field.push(files[i]); - if (file.type.startsWith('file/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDatafileupload_field[index] = { - ...this.FileDatafileupload_field[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesfileupload_field(){ - this.FileDatafileupload_field.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowfileupload_field(index,id) { - this.FileDatafileupload_field.splice(index, 1); - - if(id){ - this.mainService.uploadfiledeletefileupload_field(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewfileupload_field2: string | ArrayBuffer | null = null; -FileDatafileupload_field2: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedfileupload_field2: File[]=[]; -public onFileChangedfileupload_field2(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDatafileupload_field2[index].uploadedfile_name = files[i].name; - this.selectedfileupload_field2.push(files[i]); - if (file.type.startsWith('file/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDatafileupload_field2[index] = { - ...this.FileDatafileupload_field2[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesfileupload_field2(){ - this.FileDatafileupload_field2.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowfileupload_field2(index,id) { - this.FileDatafileupload_field2.splice(index, 1); - - if(id){ - this.mainService.uploadfiledeletefileupload_field2(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewimageupload_field: string | ArrayBuffer | null = null; -FileDataimageupload_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedimageupload_field: File[]=[]; -public onFileChangedimageupload_field(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDataimageupload_field[index].uploadedfile_name = files[i].name; - this.selectedimageupload_field.push(files[i]); - if (file.type.startsWith('image/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDataimageupload_field[index] = { - ...this.FileDataimageupload_field[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesimageupload_field(){ - this.FileDataimageupload_field.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowimageupload_field(index,id) { - this.FileDataimageupload_field.splice(index, 1); - - if(id){ - this.mainService.uploadImageupload_fielddelete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewimageupload_field2: string | ArrayBuffer | null = null; -FileDataimageupload_field2: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedimageupload_field2: File[]=[]; -public onFileChangedimageupload_field2(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDataimageupload_field2[index].uploadedfile_name = files[i].name; - this.selectedimageupload_field2.push(files[i]); - if (file.type.startsWith('image/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDataimageupload_field2[index] = { - ...this.FileDataimageupload_field2[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesimageupload_field2(){ - this.FileDataimageupload_field2.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowimageupload_field2(index,id) { - this.FileDataimageupload_field2.splice(index, 1); - - if(id){ - this.mainService.uploadImageupload_field2delete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewaudio_field: string | ArrayBuffer | null = null; -FileDataaudio_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedaudio_field: File[]=[]; -public onFileChangedaudio_field(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDataaudio_field[index].uploadedfile_name = files[i].name; - this.selectedaudio_field.push(files[i]); - if (file.type.startsWith('audio/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDataaudio_field[index] = { - ...this.FileDataaudio_field[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesaudio_field(){ - this.FileDataaudio_field.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowaudio_field(index,id) { - this.FileDataaudio_field.splice(index, 1); - - if(id){ - this.mainService.uploadAudio_fielddelete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewaudio_field2: string | ArrayBuffer | null = null; -FileDataaudio_field2: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedaudio_field2: File[]=[]; -public onFileChangedaudio_field2(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDataaudio_field2[index].uploadedfile_name = files[i].name; - this.selectedaudio_field2.push(files[i]); - if (file.type.startsWith('audio/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDataaudio_field2[index] = { - ...this.FileDataaudio_field2[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesaudio_field2(){ - this.FileDataaudio_field2.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowaudio_field2(index,id) { - this.FileDataaudio_field2.splice(index, 1); - - if(id){ - this.mainService.uploadAudio_field2delete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewvideo_field: string | ArrayBuffer | null = null; -FileDatavideo_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedvideo_field: File[]=[]; -public onFileChangedvideo_field(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDatavideo_field[index].uploadedfile_name = files[i].name; - this.selectedvideo_field.push(files[i]); - if (file.type.startsWith('video/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDatavideo_field[index] = { - ...this.FileDatavideo_field[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesvideo_field(){ - this.FileDatavideo_field.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowvideo_field(index,id) { - this.FileDatavideo_field.splice(index, 1); - - if(id){ - this.mainService.uploadVideo_fielddelete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -filePreviewvideo_field2: string | ArrayBuffer | null = null; -FileDatavideo_field2: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedvideo_field2: File[]=[]; -public onFileChangedvideo_field2(event, index) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - this.FileDatavideo_field2[index].uploadedfile_name = files[i].name; - this.selectedvideo_field2.push(files[i]); - if (file.type.startsWith('video/')) { - const reader = new FileReader(); - reader.onload = (e) => { - // Set the file preview source - const filePreview = e.target?.result as string; - this.FileDatavideo_field2[index] = { - ...this.FileDatavideo_field2[index], // Preserve existing properties - filePreview: filePreview // Update only the filePreview property - }; - }; - reader.readAsDataURL(file); - } - } -} - onAddLinesvideo_field2(){ - this.FileDatavideo_field2.push({ - uploadedfile_name: "", - filePreview: "", - // f3: "", - }); - } - deleteRowvideo_field2(index,id) { - this.FileDatavideo_field2.splice(index, 1); - - if(id){ - this.mainService.uploadVideo_field2delete(id).subscribe(data =>{ - console.log(data); - }) - } - } - -// updateaction -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.service.ts deleted file mode 100644 index ab39515..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1.service.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Adv1service{ - private baseURL = "Adv1/Adv1" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - uploadfilefileupload_field(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadfilegetByIdfileupload_field(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadfiledeletefileupload_field(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadfilefileupload_field2(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadfilegetByIdfileupload_field2(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadfiledeletefileupload_field2(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadImageupload_field(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadImageupload_fieldgetById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadImageupload_fielddelete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadImageupload_field2(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadImageupload_field2getById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadImageupload_field2delete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadAudio_field(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadAudio_fieldgetById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadAudio_fielddelete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadAudio_field2(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadAudio_field2getById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadAudio_field2delete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadVideo_field(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadVideo_fieldgetById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadVideo_fielddelete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - - uploadVideo_field2(ref:any, Adv1:any, file:any): Observable{ - const formData = new FormData(); - formData.append('file', file); - return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); - } - - uploadVideo_field2getById(ref:any, Adv1:any,): Observable { - return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); - } - - - uploadVideo_field2delete(id: number): Observable { - return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); - } - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1_cardvariable.ts deleted file mode 100644 index 8b2bd5c..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv1/Adv1_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Adv1cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.html deleted file mode 100644 index 97e973b..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.html +++ /dev/null @@ -1,898 +0,0 @@ - -
-
-
-

Adv3

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - - - - - - - country - - - - state - - - - stmlit - - - - stmmlt2 - - - - dy2 - - - - dy1 - - - - dymlti1 - - - - dymlt2 - - - - - - Action - - - - - - - - - - - -{{user.country }} - - -{{user.state }} - - -{{user.stmlit }} - - -{{user.stmmlt2 }} - - -{{user.dy2identifier}} - - -{{user.dy1identifier}} - - -{{user. dymlti1 }} - - -{{user. dymlt2 }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.ts deleted file mode 100644 index cdc58c7..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.component.ts +++ /dev/null @@ -1,777 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Adv3service} from './Adv3.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Adv3cardvariable } from './Adv3_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Adv3', - templateUrl: './Adv3.component.html', - styleUrls: ['./Adv3.component.scss'] -}) -export class Adv3Component implements OnInit { - cardButton = Adv3cardvariable.cardButton; - cardmodeldata = Adv3cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Adv3cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Adv3_formCode' -tableName = 'Adv3'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Adv3service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - - - - - - -country : [null], - -state : [null], - -stmlit : [null], - -stmmlt2 : [null], - -dy2 : [null], - -dy1 : [null], - -dymlti1 : [null], - -dymlt2 : [null], - - - - - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv3_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - - - -this.getalldy2(); - - - - if (this.dy2default) { - // Listen for product changes to auto-fill description - - - - this.entryForm.get('dy2')?.valueChanges.subscribe(name => { - if (name && this.selectdy2) { - - const found = this.selectdy2.find(p => p.name === name); - - - - console.log('found is ', found); - - // Auto-fill price when product is selected - if (found && found.default_field) { - this.entryForm.patchValue({ default_field: found.default_field_link }); - } else { - this.entryForm.patchValue({ default_field: null }); - } - - } - }); -} - -this.getalldy1(); - - - - if (this.dy1default) { - // Listen for product changes to auto-fill description - - - - this.entryForm.get('dy1')?.valueChanges.subscribe(description => { - if (description && this.selectdy1) { - - const found = this.selectdy1.find(p => p.description === description); - - - - console.log('found is ', found); - - // Auto-fill price when product is selected - if (found && found.default_field) { - this.entryForm.patchValue({ default_field: found.default_field_link }); - } else { - this.entryForm.patchValue({ default_field: null }); - } - - } - }); -} - -this.getalldymlti1(); - -this.getalldymlt2(); - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - - - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - -this.nodeEditPropertiesstmlit.editselectedAttributesstmlit = JSON.parse(this.rowSelected.stmlit ); - -this.nodeEditPropertiesstmmlt2.editselectedAttributesstmmlt2 = JSON.parse(this.rowSelected.stmmlt2 ); - - - - - -this.nodeEditPropertiesdymlti1.editselectedAttributesdymlti1 = JSON.parse(this.rowSelected.dymlti1 ); - -this.nodeEditPropertiesdymlt2.editselectedAttributesdymlt2 = JSON.parse(this.rowSelected.dymlt2 ); - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - -this.rowSelected.stmlit = JSON.stringify(this.nodeEditPropertiesstmlit.editselectedAttributesstmlit ); - -this.rowSelected.stmmlt2 = JSON.stringify(this.nodeEditPropertiesstmmlt2.editselectedAttributesstmmlt2 ); - - - - - -this.rowSelected.dymlti1 = JSON.stringify(this.nodeEditPropertiesdymlti1.editselectedAttributesdymlti1 ); - -this.rowSelected.dymlt2 = JSON.stringify(this.nodeEditPropertiesdymlt2.editselectedAttributesdymlt2 ); - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - -this.entryForm.value.stmlit = JSON.stringify(this.nodeEditPropertiesstmlit.addselectedAttributesstmlit ); - -this.entryForm.value.stmmlt2 = JSON.stringify(this.nodeEditPropertiesstmmlt2.addselectedAttributesstmmlt2 ); - - - - - -this.entryForm.value.dymlti1 = JSON.stringify(this.nodeEditPropertiesdymlti1.addselectedAttributesdymlti1 ); - -this.entryForm.value.dymlt2 = JSON.stringify(this.nodeEditPropertiesdymlt2.addselectedAttributesdymlt2 ); - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; this.getdatagrid_fieldData(); - - this.getdatagrid_field2Data(); - - - - - - - - - - - - - - - -this.nodeEditPropertiesdymlti1.addselectedAttributesdymlti1 = "" - -this.nodeEditPropertiesdymlt2.addselectedAttributesdymlt2 = "" - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} -//datagrid datagrid_field filed start -productdatagrid_field; - rowsdatagrid_field :any[]; - getHeadersdatagrid_field () { - this.rowsdatagrid_field = this.productdatagrid_field; - let headers: string[] = []; - if(this.rowsdatagrid_field ) { -this.rowsdatagrid_field.forEach((value) => { - Object.keys(value).forEach((key) => { - if(!headers.find((header) => header == key)){ - headers.push(key) - } - }) - }) -} - - return headers; - } - //datagrid datagrid_field filed end - -getdatagrid_fieldData() { - this.mainService.getdatagrid_fieldAll().subscribe((data) => { - console.log(data); this.productdatagrid_field = data; - }); -} - -//datagrid datagrid_field2 filed start -productdatagrid_field2; - rowsdatagrid_field2 :any[]; - getHeadersdatagrid_field2 () { - this.rowsdatagrid_field2 = this.productdatagrid_field2; - let headers: string[] = []; - if(this.rowsdatagrid_field2 ) { -this.rowsdatagrid_field2.forEach((value) => { - Object.keys(value).forEach((key) => { - if(!headers.find((header) => header == key)){ - headers.push(key) - } - }) - }) -} - - return headers; - } - //datagrid datagrid_field2 filed end - -getdatagrid_field2Data() { - this.mainService.getdatagrid_field2All().subscribe((data) => { - console.log(data); this.productdatagrid_field2 = data; - }); -} - - - - - - - -nodeEditPropertiesstmlit = { addselectedAttributesstmlit :"", editselectedAttributesstmlit :"" } - selectstmlit =[ - - - 'bihar', - - - - 'sikkim', - - - ]; - -nodeEditPropertiesstmmlt2 = { addselectedAttributesstmmlt2 :"", editselectedAttributesstmmlt2 :"" } - selectstmmlt2 =[ - - - 'p2', - - - - 'p3', - - - - 'ap', - - - ]; - -dy2default=false -selectdy2 ; -getalldy2() { - this.mainService.getAlldy2().subscribe(data=>{ -this.selectdy2 = data; -console.log(data); -},(error) => { console.log(error); }); } - - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - dy2Summary: any[] = []; - dy2total; -isdy2order =false; - /** - * Add selected product to order summary - */ - adddy2Order() { - const formValue = this.entryForm.value; - if (!formValue.dy2 ) { - this.toastr.error('Please select dy2'); - return; - } - // Get description from master (selectdy2) - - - - - if (this.selectdy2 && Array.isArray(this.selectdy2)) { - - - const found = this.selectdy2.find(p => p.name === formValue.dy2); - - - - - } - const line = this.dy2Summary.length + 1; - const orderItem = { - line: line, - - // unitPrice: Number(formValue.price), - // quantity: Number(formValue.quantity), - // total: Number(formValue.price) * Number(formValue.quantity) - }; - this.dy2Summary.push(orderItem); - - this.dy2total = ''; - } - - /** - * Remove item from order summary by index - */ - removedy2Order(index: number) { - this.dy2Summary.splice(index, 1); - // Recalculate line numbers - this.dy2Summary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getdy2Subtotal(): number { - return this.dy2Summary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getdy2GST(): number { - return this.getdy2Subtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getdy2GrandTotal(): number { - return this.getdy2Subtotal() + this.getdy2GST(); - - } - // ================== ORDER SUMMARY LOGIC END ================== - - -dy1default=false -selectdy1 ; -getalldy1() { - this.mainService.getAlldy1().subscribe(data=>{ -this.selectdy1 = data; -console.log(data); -},(error) => { console.log(error); }); } - - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - dy1Summary: any[] = []; - dy1total; -isdy1order =false; - /** - * Add selected product to order summary - */ - adddy1Order() { - const formValue = this.entryForm.value; - if (!formValue.dy1 ) { - this.toastr.error('Please select dy1'); - return; - } - // Get description from master (selectdy1) - - - - - if (this.selectdy1 && Array.isArray(this.selectdy1)) { - - - const found = this.selectdy1.find(p => p.description === formValue.dy1); - - - - - } - const line = this.dy1Summary.length + 1; - const orderItem = { - line: line, - - // unitPrice: Number(formValue.price), - // quantity: Number(formValue.quantity), - // total: Number(formValue.price) * Number(formValue.quantity) - }; - this.dy1Summary.push(orderItem); - - this.dy1total = ''; - } - - /** - * Remove item from order summary by index - */ - removedy1Order(index: number) { - this.dy1Summary.splice(index, 1); - // Recalculate line numbers - this.dy1Summary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getdy1Subtotal(): number { - return this.dy1Summary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getdy1GST(): number { - return this.getdy1Subtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getdy1GrandTotal(): number { - return this.getdy1Subtotal() + this.getdy1GST(); - - } - // ================== ORDER SUMMARY LOGIC END ================== - - -selectdymlti1; - getalldymlti1 () { - this.mainService.getAlldymlti1().subscribe(data=>{ - this.selectdymlti1 = data; - console.log(data); - },(error) => { console.log(error); }); } - nodeEditPropertiesdymlti1 = { addselectedAttributesdymlti1:"", editselectedAttributesdymlti1 :"" } - -selectdymlt2; - getalldymlt2 () { - this.mainService.getAlldymlt2().subscribe(data=>{ - this.selectdymlt2 = data; - console.log(data); - },(error) => { console.log(error); }); } - nodeEditPropertiesdymlt2 = { addselectedAttributesdymlt2:"", editselectedAttributesdymlt2 :"" } - -// updateaction -} - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.service.ts deleted file mode 100644 index c497e6f..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3.service.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Adv3service{ - private baseURL = "Adv3/Adv3" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } -getdatagrid_fieldAll(page?: number, size?: number): Observable { - return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); - - } - -getdatagrid_field2All(page?: number, size?: number): Observable { - return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); - - } - - - - - - - - - - - -getAlldy2(): Observable { -return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAlldy1(): Observable { -return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAlldymlti1(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAlldymlt2(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3_cardvariable.ts deleted file mode 100644 index 8ed38af..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv3/Adv3_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Adv3cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.html deleted file mode 100644 index b6b0aa5..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.html +++ /dev/null @@ -1,623 +0,0 @@ - -
-
-
-

Adv4

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - atoc - - - - atc2 - - - - atdy1 - - - - atdy2 - - - - - - description - - - - name - - - - - - - active - - - - description - - - - name - - - - - - - Action - - - - - -{{user.atocidentifier}} - - -{{user.atc2identifier}} - - -{{user. atdy1 }} - - -{{user. atdy2 }} - - - - -{{user.support.description}} - - - -{{user.support.name}} - - - - - - -{{user.childform.active}} - - - -{{user.childform.description}} - - - -{{user.childform.name}} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.ts deleted file mode 100644 index c6ba54c..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.component.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Adv4service} from './Adv4.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Adv4cardvariable } from './Adv4_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Adv4', - templateUrl: './Adv4.component.html', - styleUrls: ['./Adv4.component.scss'] -}) -export class Adv4Component implements OnInit { - cardButton = Adv4cardvariable.cardButton; - cardmodeldata = Adv4cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Adv4cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Adv4_formCode' -tableName = 'Adv4'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Adv4service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -atoc : [null], - -atc2 : [null], - -atdy1 : [null], - -atdy2 : [null], - -support: this.supportinitLinesForm(), - -childform: this.childforminitLinesForm(), - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv4_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end -this.getallatoc(); - -this.getallatc2(); - -this.getallatdy1(); - -this.getallatdy2(); - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - -supportinitLinesForm() { return this._fb.group({ - - - description: [null], - - - - name: [null], - - - -}); } - - - -childforminitLinesForm() { return this._fb.group({ - - - active: [null], - - - - description: [null], - - - - name: [null], - - - -}); } - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - -this.nodeEditPropertiesatdy1.editselectedAttributesatdy1 = JSON.parse(this.rowSelected.atdy1 ); - -this.nodeEditPropertiesatdy2.editselectedAttributesatdy2 = JSON.parse(this.rowSelected.atdy2 ); - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - -this.rowSelected.atdy1 = JSON.stringify(this.nodeEditPropertiesatdy1.editselectedAttributesatdy1 ); - -this.rowSelected.atdy2 = JSON.stringify(this.nodeEditPropertiesatdy2.editselectedAttributesatdy2 ); - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - -this.entryForm.value.atdy1 = JSON.stringify(this.nodeEditPropertiesatdy1.addselectedAttributesatdy1 ); - -this.entryForm.value.atdy2 = JSON.stringify(this.nodeEditPropertiesatdy2.addselectedAttributesatdy2 ); - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - -this.nodeEditPropertiesatdy1.addselectedAttributesatdy1 = "" - -this.nodeEditPropertiesatdy2.addselectedAttributesatdy2 = "" - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} -selectatoc ; - getallatoc () { - this.mainService.getAllatoc().subscribe(data=>{ - this.selectatoc = data; console.log(data); - },(error) => { console.log(error); }); } - -selectatc2 ; - getallatc2 () { - this.mainService.getAllatc2().subscribe(data=>{ - this.selectatc2 = data; console.log(data); - },(error) => { console.log(error); }); } - -selectatdy1; - getallatdy1 () { - this.mainService.getAllatdy1().subscribe(data=>{ - this.selectatdy1 = data; - console.log(data); - },(error) => { console.log(error); }); } - nodeEditPropertiesatdy1 = { addselectedAttributesatdy1:"", editselectedAttributesatdy1 :"" } - -selectatdy2; - getallatdy2 () { - this.mainService.getAllatdy2().subscribe(data=>{ - this.selectatdy2 = data; - console.log(data); - },(error) => { console.log(error); }); } - nodeEditPropertiesatdy2 = { addselectedAttributesatdy2:"", editselectedAttributesatdy2 :"" } - - - - - -// updateaction -} - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.service.ts deleted file mode 100644 index fd55127..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4.service.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Adv4service{ - private baseURL = "Adv4/Adv4" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } -getAllatoc(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAllatc2(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAllatdy1(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -getAllatdy2(): Observable { return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4_cardvariable.ts deleted file mode 100644 index bee29d9..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv4/Adv4_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Adv4cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.html deleted file mode 100644 index 88fba21..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.html +++ /dev/null @@ -1,787 +0,0 @@ - -
-
-
-

Adv5

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - - - age - - - - age2 - - - - - - - - - - - - - - - - Action - - - - - -{{user.name }} - - - - -{{user.age }} - - -{{user.age2 }} - - - - - - - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.ts deleted file mode 100644 index 93aecb3..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.component.ts +++ /dev/null @@ -1,851 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Adv5service} from './Adv5.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Adv5cardvariable } from './Adv5_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Adv5', - templateUrl: './Adv5.component.html', - styleUrls: ['./Adv5.component.scss'] -}) -export class Adv5Component implements OnInit { - cardButton = Adv5cardvariable.cardButton; - cardmodeldata = Adv5cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Adv5cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Adv5_formCode' -tableName = 'Adv5'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Adv5service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -support: this._fb.array([this.initsupportForm()]), - -age : [null,[Validators.required]], - -age2 : [null,[Validators.required]], - - - - - - - - - -childform: this._fb.array([this.initchildformForm()]), - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv5_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - // Subscribe to value changes for auto calculation - this.entryForm.valueChanges.subscribe(() => { - this.onInputChangeaddition('add'); - }); - -// Start polling for edit changes - this.editInterval = setInterval(() => { - if (this.modalEdit) { - this.onInputChangeaddition('edit'); - } - }, 200); - - // Subscribe to value changes for auto calculation - this.entryForm.valueChanges.subscribe(() => { - this.onInputChangemultiplication('add'); - }); - -// Start polling for edit changes - this.editInterval = setInterval(() => { - if (this.modalEdit) { - this.onInputChangemultiplication('edit'); - } - }, 200); - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - -// one to many start - initsupportForm() { return this._fb.group({ - - - - description: [null], - - - - name: [null], - - - -}); } -get supportcontrols() {return (this.entryForm.get("support") as FormArray).controls; } -onAddsupport() { -(this.entryForm.get("support")).push(this.initsupportForm()); } -onRemovesupport(index: number) { -(this.entryForm.get("support")).removeAt(index); } - oneditsupport() { this.supportcomponents.push({ - - -description: "", - - - -name: "", - - - - }); } - deletesupportRow(index) { - this.supportcomponents.splice(index, 1); - } -supportcomponents; - // one to many end - - - - - - - - - - - - - -// one to many start - initchildformForm() { return this._fb.group({ - - - - active: [null], - - - - description: [null], - - - - name: [null], - - - -}); } -get childformcontrols() {return (this.entryForm.get("childform") as FormArray).controls; } -onAddchildform() { -(this.entryForm.get("childform")).push(this.initchildformForm()); } -onRemovechildform(index: number) { -(this.entryForm.get("childform")).removeAt(index); } - oneditchildform() { this.childformcomponents.push({ - - -active: "", - - - -description: "", - - - -name: "", - - - - }); } - deletechildformRow(index) { - this.childformcomponents.splice(index, 1); - } -childformcomponents; - // one to many end - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - -this.supportcomponents = row.support; - - - - - - - - - - - - - -this.childformcomponents = row.childform; - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - -//calculated field start - -this.onInputChangeaddition ('edit'); - //calculated field end - -//calculated field start - -this.onInputChangemultiplication ('edit'); - //calculated field end - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - - - - - - - // calculated field code start - - - - additionage; - - - - additionage2; - - - - additiontotal; - additioncalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Addition" - onInputChangeaddition(mode: 'add' | 'edit') { - - - const lastObj = 0 - const lastObjstring = '' - if (mode === 'add') { - - - this.additionage = this.entryForm.value.age || ''; - - - - this.additionage2 = this.entryForm.value.age2 || ''; - - - - } else { - - - this.additionage = this.rowSelected.age; - - - - this.additionage2 = this.rowSelected.age2; - - - } - - - const ageValue = parseFloat(this.additionage) || 0; - - - - const age2Value = parseFloat(this.additionage2) || 0; - - - switch (this.additioncalculateOperators) { - case 'Addition': - this.additiontotal = ( - - - ageValue + - - - - age2Value + - - - lastObj).toString(); - break; - case 'Subtraction': - this.additiontotal = ( - - - ageValue - - - - - age2Value - - - - lastObj).toString(); - break; - case 'Multiplication': - this.additiontotal = ( - - - ageValue * - - - - age2Value * - - - 1).toString(); - - break; - case 'Division': - - this.additiontotal = ( - - - ageValue / - - - - age2Value / - - - 1).toString(); - - break; - case 'Concatination': - this.additiontotal = ` - - - ${this.additionage || ''} - - - - ${this.additionage2 || ''} - - - ${lastObjstring || ''}`; - - break; - default: - this.additiontotal = ''; - } - } - - - - // calculated field code start - - - - multiplicationage; - - - - multiplicationage2; - - - - multiplicationtotal; - multiplicationcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Multiplication" - onInputChangemultiplication(mode: 'add' | 'edit') { - - - const lastObj = 0 - const lastObjstring = '' - if (mode === 'add') { - - - this.multiplicationage = this.entryForm.value.age || ''; - - - - this.multiplicationage2 = this.entryForm.value.age2 || ''; - - - - } else { - - - this.multiplicationage = this.rowSelected.age; - - - - this.multiplicationage2 = this.rowSelected.age2; - - - } - - - const ageValue = parseFloat(this.multiplicationage) || 0; - - - - const age2Value = parseFloat(this.multiplicationage2) || 0; - - - switch (this.multiplicationcalculateOperators) { - case 'Addition': - this.multiplicationtotal = ( - - - ageValue + - - - - age2Value + - - - lastObj).toString(); - break; - case 'Subtraction': - this.multiplicationtotal = ( - - - ageValue - - - - - age2Value - - - - lastObj).toString(); - break; - case 'Multiplication': - this.multiplicationtotal = ( - - - ageValue * - - - - age2Value * - - - 1).toString(); - - break; - case 'Division': - - this.multiplicationtotal = ( - - - ageValue / - - - - age2Value / - - - 1).toString(); - - break; - case 'Concatination': - this.multiplicationtotal = ` - - - ${this.multiplicationage || ''} - - - - ${this.multiplicationage2 || ''} - - - ${lastObjstring || ''}`; - - break; - default: - this.multiplicationtotal = ''; - } - } - - -//Value List field start -value_list_fieldMode; -searchcusttextvalue_list_field :any; - valueListModalvalue_list_field :boolean=false; - openvalueListvalue_list_field(mode){ - this.valueListModalvalue_list_field=!this.valueListModalvalue_list_field ; - this.value_list_fieldMode = mode; } - customerdatavalue_list_field ; -value_list_fielderror; -clickedvalue_list_fieldID:number; - -getcustvalue_list_fieldID(id:number){ - this.clickedvalue_list_fieldID=id; - console.log("clicked by id"+ id); - this.mainService.getById(id).subscribe((data) => { console.log(data); - if(this.value_list_fieldMode == "ADD"){ - - - - this.entryForm.get('age').setValue(data.age); - - - - }else if(this.value_list_fieldMode == "EDIT"){ - - - - this.rowSelected.age= data. age - - - - } }); this.valueListModalvalue_list_field =false; - } //value List field end - -//Value List field start -value_list_field2Mode; -searchcusttextvalue_list_field2 :any; - valueListModalvalue_list_field2 :boolean=false; - openvalueListvalue_list_field2(mode){ - this.valueListModalvalue_list_field2=!this.valueListModalvalue_list_field2 ; - this.value_list_field2Mode = mode; } - customerdatavalue_list_field2 ; -value_list_field2error; -clickedvalue_list_field2ID:number; - -getcustvalue_list_field2ID(id:number){ - this.clickedvalue_list_field2ID=id; - console.log("clicked by id"+ id); - this.mainService.getById(id).subscribe((data) => { console.log(data); - if(this.value_list_field2Mode == "ADD"){ - - - - this.entryForm.get('name').setValue(data.name); - - - - this.entryForm.get('age2').setValue(data.age2); - - - - this.entryForm.get('age').setValue(data.age); - - - - }else if(this.value_list_field2Mode == "EDIT"){ - - - - this.rowSelected.name= data. name - - - - this.rowSelected.age2= data. age2 - - - - this.rowSelected.age= data. age - - - - } }); this.valueListModalvalue_list_field2 =false; - } //value List field end - - - -// updateaction -} - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.service.ts deleted file mode 100644 index 814350a..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5.service.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Adv5service{ - private baseURL = "Adv5/Adv5" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5_cardvariable.ts deleted file mode 100644 index e55c622..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Adv5/Adv5_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Adv5cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.html deleted file mode 100644 index 23d9e67..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.html +++ /dev/null @@ -1,682 +0,0 @@ - -
-
-
-

Basicp1

-
-
- - - -
-
- - - - Loading ... - -
{{error}}
-
- - name - - - - name2 - - - - number1 - - - - number2 - - - - Phone Number - - - - Phone Number2 - - - - Paragraph - Field - - - - Paragraph - Field2 - - - - Password - Field - - - - Textarea - - - - Textarea - Field - - - - Textarea - Field2 - - - - - - Action - - - - - - {{user.name }} - - - {{user.name2 }} - - - {{user.number1 }} - - - {{user.number2 }} - - - {{user.phone_number }} - - - {{user.phone_number2 }} - - - - - - - - - {{user.password_field }} - - - - - - - - - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
- File Preview -
-
-
-
-
-
-
-
-
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.scss deleted file mode 100644 index fbdee86..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.scss +++ /dev/null @@ -1,1079 +0,0 @@ -//@import "../../../../assets/scss/var"; - -// Import the field types styles -@import '../../../../../shared/components/field-types/field-types.scss'; - -@import '../../../../../../styles.scss'; - -// Import design tokens -@import '../../../../../../styles/design-tokens'; - -// User Group Maintenance Styles -.ug-hero { - display: flex; - justify-content: space-between; - align-items: center; - padding: 24px 32px; - background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent) 100%); - color: white; - border-radius: 16px; - margin-bottom: 24px; - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); - backdrop-filter: blur(16px); - border: 1px solid rgba(255, 255, 255, 0.2); - font-family: var(--theme-font-primary); - - &__content { - display: flex; - align-items: center; - gap: 16px; - } - - &__icon { - background: rgba(255, 255, 255, 0.2); - border-radius: 50%; - padding: 16px; - display: flex; - align-items: center; - justify-content: center; - - clr-icon { - width: 36px; - height: 36px; - color: white; - } - } - - &__title { - font-size: 28px; - font-weight: 700; - margin: 0; - color: white; - font-family: var(--theme-font-secondary); - } - - &__subtitle { - font-size: 16px; - margin: 0; - opacity: 0.9; - color: rgba(255, 255, 255, 0.8); - } - - &__actions { - display: flex; - gap: 12px; - } -} - -.ug-btn-text { - margin-left: 8px; -} - -// Modern Button Styles using ThemeService -.ug-btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 8px; - padding: 12px 20px; - font-size: 14px; - font-weight: 500; - line-height: 1; - border-radius: 8px; - border: 1px solid transparent; - cursor: pointer; - transition: all 200ms ease-out; - text-decoration: none; - position: relative; - overflow: hidden; - font-family: var(--theme-font-primary); - z-index: 1; - - &:focus { - outline: 2px solid var(--theme-primary); - outline-offset: 2px; - } - - &:disabled { - opacity: 0.5; - cursor: not-allowed; - pointer-events: none; - } - - // Sizes - &.ug-btn-sm { - padding: 8px 16px; - font-size: 13px; - height: 32px; - } - - &.ug-btn-md { - padding: 12px 20px; - font-size: 14px; - height: 40px; - } - - &.ug-btn-lg { - padding: 16px 24px; - font-size: 16px; - height: 48px; - } - - // Variants - &.ug-btn-primary { - background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent) 100%); - color: white; - border-color: var(--theme-primary); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - - &:hover { - background: linear-gradient(135deg, var(--theme-primary, #0284c7) 0%, var(--theme-accent, #7c3aed) 100%); - transform: translateY(-2px); - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - } - - &:active { - transform: translateY(0); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - } - } - - &.ug-btn-secondary { - background: var(--theme-surface); - color: var(--theme-text); - border-color: rgba(0, 0, 0, 0.1); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - - &:hover { - background: var(--theme-background); - border-color: rgba(0, 0, 0, 0.2); - transform: translateY(-1px); - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - } - } - - &.ug-btn-outline { - background: transparent; - color: var(--theme-secondary); - border-color: var(--theme-secondary); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - - &:hover { - background: rgba(100, 116, 139, 0.1); // var(--theme-secondary) with 10% opacity - border-color: var(--theme-secondary); - color: var(--theme-secondary); - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - } - } - - &.ug-btn-error { - background: var(--theme-error, #ef4444); - color: white; - border-color: var(--theme-error, #ef4444); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - - &:hover { - background: var(--theme-error-dark, #dc2626); - border-color: var(--theme-error-dark, #dc2626); - transform: translateY(-2px); - box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3), 0 4px 6px -2px rgba(239, 68, 68, 0.1); - } - } - - &.ug-btn-ghost { - background: transparent; - color: var(--theme-text-secondary); - border-color: transparent; - - &:hover { - background: var(--theme-background); - color: var(--theme-text); - } - } -} - -.ug-toolbar { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 24px; - padding: 16px; - background: var(--theme-surface); - border-radius: 12px; - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - - &__left { - flex: 1; - } - - &__right { - display: flex; - gap: 8px; - } -} - -.ug-search { - position: relative; - max-width: 400px; - - clr-icon { - position: absolute; - left: 12px; - top: 50%; - transform: translateY(-50%); - color: #9ca3af; - z-index: 1; - } - - &__input { - width: 100%; - padding: 12px 12px 12px 40px; - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 8px; - font-size: 14px; - transition: all 200ms ease-out; - background: var(--theme-surface); - color: var(--theme-text); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05); - - &:focus { - outline: none; - border-color: var(--theme-primary); - box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1); // var(--theme-primary) with 10% opacity - } - } -} - -.ug-view-toggle { - display: flex; - border: 1px solid #d1d5db; - border-radius: 8px; - overflow: hidden; - - .ug-btn { - border-radius: 0; - border: none; - background: var(--theme-surface); - color: var(--theme-text-secondary); - - &:first-child { - border-right: 1px solid #d1d5db; - } - - &.ug-btn-primary { - background: var(--theme-primary); - color: white; - } - } -} - -// Modern Table Styles -.ug-grid { - background: var(--theme-surface); - border-radius: 16px; - overflow: hidden; - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); - margin-bottom: 24px; - - ::ng-deep .datagrid { - .datagrid-head { - background: var(--theme-background); - - .datagrid-column { - padding: 16px 24px; - font-size: 12px; - font-weight: 600; - color: var(--theme-text-secondary); - text-transform: uppercase; - letter-spacing: 0.05em; - border-bottom: 1px solid #e5e7eb; - } - } - - .datagrid-row { - transition: background-color 150ms ease-out; - - &:hover { - background: var(--theme-background); - } - - &:not(:last-child) { - border-bottom: 1px solid #e5e7eb; - } - - .datagrid-cell { - padding: 16px 24px; - font-size: 14px; - color: var(--theme-text); - } - } - - .datagrid-footer { - background: var(--theme-background); - border-top: 1px solid #e5e7eb; - padding: 16px 24px; - } - } -} - -.ug-grid-footer { - background: var(--theme-background); - border-top: 1px solid #e5e7eb; -} - -// Modern Card Styles - More beautiful design -.ug-cards { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); - gap: 24px; - margin-bottom: 24px; -} - -.ug-card-item { - background: var(--theme-surface); - border: 1px solid rgba(0, 0, 0, 0.06); - border-radius: var(--theme-border-radius); // Using theme variable - box-shadow: var(--theme-shadow); // Using theme variable - overflow: hidden; - display: flex; - flex-direction: column; - transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); - - &:hover { - transform: translateY(-5px); - box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); - border-color: rgba(14, 165, 233, 0.3); // var(--theme-primary) with 30% opacity - } - - &__header { - display: flex; - align-items: center; - gap: 10px; - padding: 16px; - background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), transparent); // var(--theme-primary) with 10% opacity - min-height: 60px; - } - - &__icon { - clr-icon { - width: 24px; - height: 24px; - color: var(--theme-primary); - } - } - - &__title { - font-weight: 700; - flex: 1 1 auto; - font-size: 18px; - color: var(--theme-text); - max-width: 60%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - &__badge { - margin-left: auto; - display: inline-flex; - align-items: center; - padding: 4px 12px; - font-size: 12px; - font-weight: 600; - border-radius: 9999px; - text-transform: uppercase; - letter-spacing: 0.05em; - } - - &__body { - padding: 16px; - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 12px; - } - - &__footer { - padding: 16px; - display: flex; - gap: 8px; - border-top: 1px solid rgba(0, 0, 0, 0.06); - background: var(--theme-background); - } -} - -.ug-kv { - display: flex; - justify-content: space-between; - font-size: 14px; - - span { - color: var(--theme-text-secondary); - } - - strong { - color: var(--theme-text); - font-weight: 500; - text-align: right; - max-width: 60%; - overflow: hidden; - text-overflow: ellipsis; - } -} - -// Theme the card footer buttons -.ug-card-item__footer .ug-btn { - border-radius: 10px; - flex: 1; - justify-content: center; -} - -.ug-card-item__footer .ug-btn.ug-btn-outline { - border: 1px solid var(--theme-secondary); - color: var(--theme-secondary); - background: transparent; - - &:hover { - background: rgba(100, 116, 139, 0.1); // var(--theme-secondary) with 10% opacity - border-color: var(--theme-secondary); - color: var(--theme-secondary); - } -} - -.ug-card-item__footer .ug-btn.ug-btn-error { - background: var(--theme-error, #ef4444); - color: #fff; - border-color: var(--theme-error, #ef4444); - - &:hover { - background: var(--theme-error-dark, #dc2626); - border-color: var(--theme-error-dark, #dc2626); - transform: translateY(-2px); - } -} - -// Table view action buttons -.ug-action-item { - @extend .ug-btn; - @extend .ug-btn-ghost; - @extend .ug-btn-sm; - width: 100%; - justify-content: flex-start; - margin-bottom: 4px; - text-align: left; - - clr-icon { - width: 16px; - height: 16px; - margin-right: 8px; - } - - &.ug-btn-error { - color: var(--theme-error, #ef4444); - - &:hover { - background: rgba(239, 68, 68, 0.1); - } - } -} - -// Ensure action overflow is visible -::ng-deep .datagrid-action-overflow { - button.action-item { - display: flex; - align-items: center; - width: 100%; - text-align: left; - padding: 8px 12px; - - clr-icon { - margin-right: 8px; - } - } -} - -// Status Badges -.ug-status-badge { - display: inline-flex; - align-items: center; - padding: 6px 16px; - font-size: 13px; - font-weight: 600; - border-radius: 9999px; - text-transform: uppercase; - letter-spacing: 0.05em; -} - -.ug-status-enabled { - background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%); - color: #10b981; -} - -.ug-status-disabled { - background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%); - color: #ef4444; -} - -// Form Styles -.ug-form-group { - margin-bottom: 20px; -} - -.ug-form-label { - display: block; - font-size: 14px; - font-weight: 500; - color: var(--theme-text); - margin-bottom: 8px; - font-family: var(--theme-font-primary); -} - -.ug-form-input, -.ug-form-select { - width: 100%; - padding: 12px 16px; - font-size: 14px; - line-height: 1.5; - color: var(--theme-text); - background: var(--theme-surface); - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 8px; - transition: all 200ms ease-out; - margin-bottom: 0; - font-family: var(--theme-font-primary); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05); - - &:focus { - outline: none; - border-color: var(--theme-primary); - box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1); // var(--theme-primary) with 10% opacity - } - - &:disabled { - background: var(--theme-background); - color: var(--theme-text-secondary); - cursor: not-allowed; - } - - &.error { - border-color: #ef4444; - box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); - } - - &::placeholder { - color: var(--theme-text-secondary); - } -} - -.ug-form-select { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 12px center; - background-repeat: no-repeat; - background-size: 16px 12px; - padding-right: 40px; - appearance: none; -} - -.ug-form-error { - color: #ef4444; - font-size: 12px; - margin-top: 6px; - font-weight: 500; -} - -.required-field { - color: #ef4444; - margin-left: 4px; -} - -.ug-file-input { - width: 100%; - padding: 12px; - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 8px; - background: var(--theme-surface); - color: var(--theme-text); - - &::file-selector-button { - @extend .ug-btn; - @extend .ug-btn-secondary; - margin-right: 12px; - padding: 8px 16px; - border: none; - } -} - -// Delete Modal Styles -.ug-delete-header { - text-align: center; - padding: 24px; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.ug-delete-icon { - color: #ef4444; - margin-bottom: 16px; -} - -.ug-delete-title { - font-size: 24px; - font-weight: 700; - color: var(--theme-text); - margin: 0 0 8px 0; -} - -.ug-delete-subtitle { - font-size: 16px; - color: var(--theme-text-secondary); - margin: 0; -} - -.ug-delete-details { - padding: 24px; -} - -.ug-delete-detail-item { - display: flex; - justify-content: space-between; - padding: 12px 0; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - - &:last-child { - border-bottom: none; - } -} - -.ug-delete-detail-label { - font-weight: 500; - color: var(--theme-text-secondary); -} - -.ug-delete-detail-value { - font-weight: 600; - color: var(--theme-text); -} - -.delete { - color: #ef4444; - text-align: center; - margin-bottom: 16px; - font-weight: 600; - font-size: 20px; -} - -.heading { - text-align: center; - margin-bottom: 24px; - color: var(--theme-text); - font-weight: 600; -} - -// Modal Header -::ng-deep .modal-header { - background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent) 100%); - color: white; - border-radius: 16px 16px 0 0 !important; - padding: 20px 24px !important; - - .modal-title { - color: white; - font-weight: 600; - font-size: 20px; - margin: 0; - } - - .close { - color: white; - opacity: 0.8; - - &:hover { - opacity: 1; - } - } -} - -// Modal Body -::ng-deep .modal-body { - padding: 24px !important; -} - -// Modal Footer -::ng-deep .modal-footer { - padding: 20px 24px !important; - background: var(--theme-background); - border-radius: 0 0 16px 16px !important; - border-top: 1px solid rgba(0, 0, 0, 0.05) !important; -} - -// Responsive adjustments -@media (max-width: 768px) { - .ug-hero { - flex-direction: column; - gap: 16px; - text-align: center; - - &__content { - flex-direction: column; - text-align: center; - } - - &__actions { - width: 100%; - justify-content: center; - flex-wrap: wrap; - } - } - - .ug-toolbar { - flex-direction: column; - gap: 16px; - } - - .ug-search { - max-width: 100%; - } - - .ug-cards { - grid-template-columns: 1fr; - } - - .ug-card-item { - &__header { - flex-direction: column; - text-align: center; - - &__icon { - margin-right: 0; - margin-bottom: 16px; - } - } - - &__footer { - justify-content: center; - } - } -} - -// Hero section -.sq-hero { - display: flex; - justify-content: space-between; - align-items: center; - padding: 24px 32px; - background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent) 100%); - color: white; - border-radius: 16px; - margin-bottom: 24px; - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); - backdrop-filter: blur(16px); - border: 1px solid rgba(255, 255, 255, 0.2); - font-family: var(--theme-font-primary); - - &__content { - display: flex; - align-items: center; - gap: 16px; - } - - &__icon { - background: rgba(255, 255, 255, 0.2); - border-radius: 50%; - padding: 16px; - display: flex; - align-items: center; - justify-content: center; - - clr-icon { - width: 36px; - height: 36px; - color: white; - } - } - - &__title { - font-size: 28px; - font-weight: 700; - margin: 0; - color: white; - font-family: var(--theme-font-secondary); - } - - &__subtitle { - font-size: 16px; - margin: 0; - opacity: 0.9; - color: rgba(255, 255, 255, 0.8); - } - - &__actions { - display: flex; - align-items: center; - gap: 12px; - } -} - -.sq-container { - background: var(--theme-surface); - border-radius: 16px; - padding: 24px; - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); - margin-bottom: 24px; -} - -.delete, -.heading { - text-align: center; - color: var(--theme-error, #ef4444); -} - -.entry-pg { - width: 750px; -} - -.button1::after { - content: none; -} - -.button1:hover::after { - content: "ADD ROWS"; -} - -.section { - background-color: var(--theme-background, #dddddd); - height: 40px; -} - -.section p { - //color: white; - padding: 10px; - font-size: 18px; -} - -.center { - text-align: center; -} - -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: var(--theme-primary, #1a237e); - letter-spacing: 0.5px; - font-size: 1.25rem; -} - -// Modal Styles -.sq-modal-title clr-icon { - margin-right: 6px; - color: var(--theme-primary); -} - -// Delete Modal Styles -.sq-delete-header { - text-align: center; - padding: 24px; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.sq-delete-icon { - color: var(--theme-error, #ef4444); - margin-bottom: 16px; -} - -.sq-delete-title { - font-size: 24px; - font-weight: 700; - color: var(--theme-text); - margin: 0 0 8px 0; -} - -.sq-delete-subtitle { - font-size: 16px; - color: var(--theme-text-secondary); - margin: 0; -} - -.sq-delete-details { - padding: 24px; -} - -.sq-delete-detail-item { - display: flex; - justify-content: space-between; - padding: 12px 0; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - - &:last-child { - border-bottom: none; - } -} - -.sq-delete-detail-label { - font-weight: 500; - color: var(--theme-text-secondary); -} - -.sq-delete-detail-value { - font-weight: 600; - color: var(--theme-text); -} - -// Data Grid Styles -.sq-grid { - background: var(--theme-surface); - border-radius: 16px; - overflow: hidden; - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); - margin-bottom: 24px; - - ::ng-deep .datagrid { - .datagrid-head { - background: var(--theme-background); - - .datagrid-column { - padding: 16px 24px; - font-size: 12px; - font-weight: 600; - color: var(--theme-text-secondary); - text-transform: uppercase; - letter-spacing: 0.05em; - border-bottom: 1px solid #e5e7eb; - } - } - - .datagrid-row { - transition: background-color 150ms ease-out; - - &:hover { - background: var(--theme-background); - } - - &:not(:last-child) { - border-bottom: 1px solid #e5e7eb; - } - - .datagrid-cell { - padding: 16px 24px; - font-size: 14px; - color: var(--theme-text); - } - } - - .datagrid-footer { - background: var(--theme-background); - border-top: 1px solid #e5e7eb; - padding: 16px 24px; - } - } -} - -.sq-grid-footer { - background: var(--theme-background); - border-top: 1px solid #e5e7eb; -} - -// Action items in datagrid - using direct styles instead of extend -.sq-action-item { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 8px; - padding: 8px 16px; - font-size: 13px; - font-weight: 500; - line-height: 1; - border-radius: 8px; - border: 1px solid transparent; - cursor: pointer; - transition: all 200ms ease-out; - text-decoration: none; - position: relative; - overflow: hidden; - font-family: var(--theme-font-primary); - z-index: 1; - width: 100%; - justify-content: flex-start; - margin-bottom: 4px; - text-align: left; - background: transparent; - color: var(--theme-text-secondary); - border-color: transparent; - - &:focus { - outline: 2px solid var(--theme-primary); - outline-offset: 2px; - } - - &:disabled { - opacity: 0.5; - cursor: not-allowed; - pointer-events: none; - } - - clr-icon { - width: 16px; - height: 16px; - margin-right: 8px; - } - - &:hover { - background: var(--theme-background); - color: var(--theme-text); - } - - &.sq-btn-error { - color: var(--theme-error, #ef4444); - - &:hover { - background: rgba(239, 68, 68, 0.1); - color: var(--theme-error, #ef4444); - } - } -} - -// Form Styles -.sq-form { - .clr-row { - margin: 0 -12px; - } - - .clr-col-md-6, - .clr-col-sm-12 { - padding: 0 12px; - margin-bottom: 20px; - } -} - -.sq-form-actions { - display: flex; - gap: 12px; - margin-top: 24px; - padding-top: 24px; - border-top: 1px solid rgba(0, 0, 0, 0.05); -} - -// Responsive adjustments -@media (max-width: 768px) { - .sq-hero { - flex-direction: column; - gap: 16px; - text-align: center; - - &__content { - flex-direction: column; - text-align: center; - } - - &__actions { - width: 100%; - justify-content: center; - } - } - - .sq-form-actions { - flex-direction: column; - } - - .sq-btn { - width: 100%; - justify-content: center; - } -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.ts deleted file mode 100644 index 6cd06c2..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.component.ts +++ /dev/null @@ -1,510 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Basicp1service } from './Basicp1.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Basicp1cardvariable } from './Basicp1_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Basicp1', - templateUrl: './Basicp1.component.html', - styleUrls: ['./Basicp1.component.scss'] -}) -export class Basicp1Component implements OnInit { - cardButton = Basicp1cardvariable.cardButton; - cardmodeldata = Basicp1cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Basicp1cardvariable.cardButton; - cardmodal; changeView() { - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected: any = {}; - modaldelete = false; - modalEdit = false; - modalAdd = false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine: any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Basicp1_formCode' - tableName = 'Basicp1'; checkFormCode; selected: any[] = []; - constructor( - private extensionService: ExtensionService, - private userInfoService: UserInfoService, - private mainService: Basicp1service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; - // component button - ngOnInit(): void { - if (this.cardmodeldata !== '') { - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole = this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - name: [null], - - name2: [null], - - number1: [null, [Validators.required]], - - number2: [null, [Validators.required]], - - phone_number: ['+91'], - - phone_number2: ['+91'], - - paragraph_field: [null], - - paragraph_field2: [null], - - password_field: [null], - confirmpassword_field: [null], - - textarea: [null], - - textarea_field: [null], - - textarea_field2: [null], - - - - - }, { - validator: Confirmedpassword_fieldValidator('password_field', 'confirmpassword_field') - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Basicp1_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - - - - - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; - this.product = [...this.product].reverse(); if (this.product.length == 0) { - this.error = "No Data Available" - } - }, (error) => { - console.log(error); - if (error) { - this.error = "Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - - - - - - - - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete = true; - } - delete(id) { - this.modaldelete = false; - console.log("in delete " + id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - - - - - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - onCreate() { - this.modalAdd = false; - - - - - - - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { - this.modalAdd = true; this.submitted = false; - - - - - - - - - - - - - - - - - - - - - - - - - } - submitted = false; - onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - } this.onCreate(); - - } - - - - - - - - - isValidPhone_number(phone: string): boolean { - const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; - return phonePattern.test(phone); - } - - isValidPhone_number2(phone: string): boolean { - const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; - return phonePattern.test(phone); - } - - rsModalparagraph_field = false; - goToReplaceStringparagraph_field(row) { - this.rowSelected = row; this.rsModalparagraph_field = true; - } - - rsModalparagraph_field2 = false; - goToReplaceStringparagraph_field2(row) { - this.rowSelected = row; this.rsModalparagraph_field2 = true; - } - - newpHidepassword_field: boolean = true; - newIconpassword_field: string = "eye"; - newShapeChangerpassword_field() { - this.newpHidepassword_field = !this.newpHidepassword_field; - if (this.newpHidepassword_field) { - this.newIconpassword_field = 'eye' - } else { this.newIconpassword_field = 'eye-hide' } - } - - newaddpHidepassword_field: boolean = true; - newaddIconpassword_field: string = "eye"; - newaddChangerpassword_field() { - this.newaddpHidepassword_field = !this.newaddpHidepassword_field; - if (this.newaddpHidepassword_field) { this.newaddIconpassword_field = 'eye' } else { - this.newaddIconpassword_field = 'eye-hide' - } - } - - rsModaltextarea = false; - goToReplaceStringtextarea(row) { - this.rowSelected = row; this.rsModaltextarea = true; - } - - rsModaltextarea_field = false; - goToReplaceStringtextarea_field(row) { - this.rowSelected = row; this.rsModaltextarea_field = true; - } - - rsModaltextarea_field2 = false; - goToReplaceStringtextarea_field2(row) { - this.rowSelected = row; this.rsModaltextarea_field2 = true; - } - - // updateaction -} - - - - - - - - - - - - - - - -export function Confirmedpassword_fieldValidator(controlName: string, matchingControlName: string) { - return (formGroup: FormGroup) => { - const control = formGroup.controls[controlName]; - const matchingControl = formGroup.controls[matchingControlName]; - if (matchingControl.errors && !matchingControl.errors.confirmedpassword_fieldValidator) { - return; - } - if (control.value !== matchingControl.value) { - matchingControl.setErrors({ confirmedpassword_fieldValidator: true }); - } else { - matchingControl.setErrors(null); - } - } -} - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.service.ts deleted file mode 100644 index 4258bf3..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1.service.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Basicp1service{ - private baseURL = "Basicp1/Basicp1" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1_cardvariable.ts deleted file mode 100644 index 69dfa6e..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp1/Basicp1_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Basicp1cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.html deleted file mode 100644 index 9fdc3e8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.html +++ /dev/null @@ -1,560 +0,0 @@ - -
-
-
-

Basicp2

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - about - - - - Textarea2 - - - - Date Field - - - - Date Field2 - - - - Datetime Field - - - - Datetime Field2 - - - - Email Field - - - - Email Field2 - - - - - - - - Action - - - - - - - - - - - - - -{{user.date_field }} - - -{{user.date_field2 }} - - -{{user.datetime_field }} - - -{{user.datetime_field2 }} - - -{{user.email_field }} - - -{{user.email_field2 }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.ts deleted file mode 100644 index bb0c699..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.component.ts +++ /dev/null @@ -1,425 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Basicp2service} from './Basicp2.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Basicp2cardvariable } from './Basicp2_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Basicp2', - templateUrl: './Basicp2.component.html', - styleUrls: ['./Basicp2.component.scss'] -}) -export class Basicp2Component implements OnInit { - cardButton = Basicp2cardvariable.cardButton; - cardmodeldata = Basicp2cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Basicp2cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Basicp2_formCode' -tableName = 'Basicp2'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Basicp2service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -about : [null], - -textarea2 : [null], - -date_field : [null], - -date_field2 : [null], - -datetime_field : [null], - -datetime_field2 : [null], - -email_field : [null], - -email_field2 : [null], - - - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Basicp2_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} -rsModalabout = false; -goToReplaceStringabout(row){ -this.rowSelected = row; this.rsModalabout =true; } - -rsModaltextarea2 = false; -goToReplaceStringtextarea2(row){ -this.rowSelected = row; this.rsModaltextarea2 =true; } - - - - - - - - - -isValidemail_field(email: string): boolean { - const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; - return emailPattern.test(email); } - -isValidemail_field2(email: string): boolean { - const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; - return emailPattern.test(email); } - - - -// updateaction -} - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.service.ts deleted file mode 100644 index dfd7233..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2.service.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Basicp2service{ - private baseURL = "Basicp2/Basicp2" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2_cardvariable.ts deleted file mode 100644 index 48d7ae9..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp2/Basicp2_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Basicp2cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.html deleted file mode 100644 index 5d03ef2..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.html +++ /dev/null @@ -1,627 +0,0 @@ - -
-
-
-

Basicp3

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Toggle Switch - - - - Toggle Switch2 - - - - Url Field - - - - Url Field2 - - - - Decimal Field - - - - Decimal Field2 - - - - Percentage Field - - - - Percentage Field2 - - - - documentsequenc - - - - recaptcha - - - - recaptcha2 - - - - - - Action - - - - - -{{user.toggle_switch }} - - -{{user.toggle_switch2 }} - - -{{user.url_field}} - - -{{user.url_field2}} - - -{{user.decimal_field }} - - -{{user.decimal_field2 }} - - -{{user.percentage_field }} - - -{{user.percentage_field2 }} - - -{{user.documentsequenc }} - - -{{user.recaptcha }} - - -{{user.recaptcha2 }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.ts deleted file mode 100644 index 41b9c71..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.component.ts +++ /dev/null @@ -1,517 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Basicp3service} from './Basicp3.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Basicp3cardvariable } from './Basicp3_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Basicp3', - templateUrl: './Basicp3.component.html', - styleUrls: ['./Basicp3.component.scss'] -}) -export class Basicp3Component implements OnInit { - cardButton = Basicp3cardvariable.cardButton; - cardmodeldata = Basicp3cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Basicp3cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Basicp3_formCode' -tableName = 'Basicp3'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Basicp3service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -toggle_switch : [true], - -toggle_switch2 : [true], - -url_field : [null], - -url_field2 : [null], - -decimal_field : [null,[Validators.required]], - -decimal_field2 : [null,[Validators.required]], - -percentage_field : [null,[Validators.required]], - -percentage_field2 : [null,[Validators.required]], - -documentsequenc : [null], - -recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]], - -recaptcha2 : ['', [Validators.required,this.checkrecaptcha2.bind(this)]], - - - - - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Basicp3_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - - - - - - - -this.generaterecaptcha() - -this.generaterecaptcha2() - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - - - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - - - - - - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - - - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - - - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - -isValidurl_field(url: string): boolean { - return /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/.test(url); } - goTourl_fieldUrl(val){ window.open(val) } - -isValidurl_field2(url: string): boolean { - return /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/.test(url); } - goTourl_field2Url(val){ window.open(val) } - - - - - - - - - - - -recaptchaCode = ''; -generaterecaptcha (): void { - const possibleCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - const codeLength = 6; // Change to desired length - - let recaptcha= ''; - for (let i = 0; i < codeLength; i++) { - const randomIndex = Math.floor(Math.random() * possibleCharacters.length); - recaptcha += possibleCharacters.charAt(randomIndex); - } - this.recaptchaCode = recaptcha; -} - -checkrecaptcha(control: AbstractControl): ValidationErrors | null { - if (control.value !== this.recaptchaCode) { - return { recaptchaMismatch: true }; - } - return null; -} - -recaptchaMismatch = false; - -checkrecaptchaEdit(): void { - if (this.rowSelected.recaptcha !== this. recaptchaCode) { - this. recaptchaMismatch = true; } else { this.recaptchaMismatch = false; } } - -recaptcha2Code = ''; -generaterecaptcha2 (): void { - const possibleCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - const codeLength = 6; // Change to desired length - - let recaptcha2= ''; - for (let i = 0; i < codeLength; i++) { - const randomIndex = Math.floor(Math.random() * possibleCharacters.length); - recaptcha2 += possibleCharacters.charAt(randomIndex); - } - this.recaptcha2Code = recaptcha2; -} - -checkrecaptcha2(control: AbstractControl): ValidationErrors | null { - if (control.value !== this.recaptcha2Code) { - return { recaptcha2Mismatch: true }; - } - return null; -} - -recaptcha2Mismatch = false; - -checkrecaptcha2Edit(): void { - if (this.rowSelected.recaptcha2 !== this. recaptcha2Code) { - this. recaptcha2Mismatch = true; } else { this.recaptcha2Mismatch = false; } } - -// updateaction -} - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.service.ts deleted file mode 100644 index d02c10d..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3.service.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Basicp3service{ - private baseURL = "Basicp3/Basicp3" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3_cardvariable.ts deleted file mode 100644 index ff91595..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Basicp3/Basicp3_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Basicp3cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.html deleted file mode 100644 index 1b6217f..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.html +++ /dev/null @@ -1,1130 +0,0 @@ - -
-
-
-

Customer Information

-
-
- - - -
-
- - - - Loading ... - -
{{error}}
-
- - Company Name - - - - Contact - Person - - - - Manufacturer - - - - Type - - - - Product - - - - Email Address - - - - Customer - Address - - - - Deployment - Type - - - - - - - dg monitoring - with fule - - - - - active - energy - - - - - - water management-stp/etp - - - - - dg monitoring - without fule - - - - - ups - monitoring - - - - - apfc - panel monitoring - - - - - busbar - monitoring - - - - - lt - panel monitoring - - - - - ht - panel monitoring - - - - - compressed air -gag monitoring - - - - - compressed air - lpg/n2/o2/co2 - - - - - water management-water monitoring - - - - - - - Quantity - - - - Price - - - - - - Description - - - - Phone Number - - - - - - - - Action - - - - - - {{user.company_name }} - - - - - - - {{user. manufactureridentifier}} - - - {{user.type }} - - - {{user.product }} - - - {{user.email_address }} - - - - - - {{user. deployment_typeidentifier}} - - - - - {{user.ups_monitoring}} - - - - {{user.active_energy}} - - - - {{user.dg_monitoring___with_fule}} - - - - {{user.water_management_stp_etp}} - - - - {{user.dg_monitoring___without_fule}} - - - - {{user.apfc_panel_monitoring}} - - - - {{user.busbar_monitoring}} - - - - {{user.lt_panel_monitoring}} - - - - {{user.ht_panel_monitoring}} - - - - {{user.compressed_air__gag_monitoring}} - - - - {{user.compressed_air___lpg_n2_o2_co2}} - - - - {{user.water_management_water_monitoring}} - - - - - - {{user.quantity }} - - - {{user.price }} - - - - - - - - {{user.phone_number }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
- File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.ts deleted file mode 100644 index ab03235..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.component.ts +++ /dev/null @@ -1,653 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Customer_informationservice } from './Customer_information.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Customer_informationcardvariable } from './Customer_information_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Customer_information', - templateUrl: './Customer_information.component.html', - styleUrls: ['./Customer_information.component.scss'] -}) -export class Customer_informationComponent implements OnInit { - cardButton = Customer_informationcardvariable.cardButton; - cardmodeldata = Customer_informationcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Customer_informationcardvariable.cardButton; - cardmodal; changeView() { - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected: any = {}; - modaldelete = false; - modalEdit = false; - modalAdd = false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine: any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Customer_information_formCode' - tableName = 'Customer_information'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, - private userInfoService: UserInfoService, - private mainService: Customer_informationservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; - // component button - ngOnInit(): void { - if (this.cardmodeldata !== '') { - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole = this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - company_name: [null], - - contact_person: [null], - - manufacturer: [null], - - type: [null], - - - product: [null], - - - email_address: [null], - - customer_address: [null], - - deployment_type: [null], - - - - busbar_monitoring: [false], - - - - active_energy: [false], - - - - dg_monitoring___with_fule: [false], - - - - dg_monitoring___without_fule: [false], - - - - ups_monitoring: [false], - - - - apfc_panel_monitoring: [false], - - - - lt_panel_monitoring: [false], - - - - water_management_stp_etp: [false], - - - - ht_panel_monitoring: [false], - - - - compressed_air__gag_monitoring: [false], - - - - compressed_air___lpg_n2_o2_co2: [false], - - - - water_management_water_monitoring: [false], - - - - quantity: [null, [Validators.required]], - - price: [null, [Validators.required]], - - - - description: [null], - - phone_number: ['+91'], - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Customer_information_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - this.getallmanufacturer(); - - - // Listen for country changes - - - this.entryForm.get('manufacturer')?.valueChanges.subscribe((item) => { - - - if (item) { - this.dependet2type(item); - } else { - this.typedependentData = []; - this.entryForm.get('type')?.setValue(null); // clear state - } - }); - - - - // Listen for country changes - - - this.entryForm.get('type')?.valueChanges.subscribe((item) => { - - - if (item) { - this.dependet2product(item); - } else { - this.productdependentData = []; - this.entryForm.get('product')?.setValue(null); // clear state - } - }); - - - this.getalldeployment_type(); - - - - // Subscribe to value changes for auto calculation - this.entryForm.valueChanges.subscribe(() => { - this.onInputChangetotal('add'); - }); - - // Start polling for edit changes - this.editInterval = setInterval(() => { - if (this.modalEdit) { - this.onInputChangetotal('edit'); - } - }, 200); - - // Listen for product changes to auto-fill description - this.entryForm.get('product')?.valueChanges.subscribe(productName => { - if (productName && this.productdependentData) { - const found = this.productdependentData.find(p => p.product_name === productName); - console.log('found is ', found); - if (found && found.description) { - this.entryForm.patchValue({ description: found.description }); - } else { - this.entryForm.patchValue({ description: '' }); - } - // Auto-fill price when product is selected - if (found && found.price) { - this.entryForm.patchValue({ price: found.price }); - } else { - this.entryForm.patchValue({ price: null }); - } - } else { - this.entryForm.patchValue({ description: '' }); - this.entryForm.patchValue({ price: null }); - } - }); - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; - this.product = [...this.product].reverse(); if (this.product.length == 0) { - this.error = "No Data Available" - } - }, (error) => { - console.log(error); - if (error) { - this.error = "Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - // Dependemt Dropdown field start - this.dependet2type(row.dependentDD); - // Dependemt Dropdown field end - - // Dependemt Dropdown field start - this.dependet2product(row.dependentDD); - // Dependemt Dropdown field end - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete = true; - } - delete(id) { - this.modaldelete = false; - console.log("in delete " + id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - //calculated field start - - this.onInputChangetotal('edit'); - //calculated field end - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - onCreate() { - this.modalAdd = false; - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { - this.modalAdd = true; this.submitted = false; - - - } - submitted = false; - onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - } this.onCreate(); - - } - - - rsModalcontact_person = false; - goToReplaceStringcontact_person(row) { - this.rowSelected = row; this.rsModalcontact_person = true; - } - - selectmanufacturer; - getallmanufacturer() { - this.mainService.getAllmanufacturer().subscribe(data => { - this.selectmanufacturer = data; - console.log(data); - }, (error) => { console.log(error); }); - } - - // Dependemt Dropdown field start - - - typedependentData: any; - dependet2type(item) { - this.mainService.gettypeDependent(item).subscribe((data) => { - console.log(data); - this.typedependentData = data; - }, (error) => { console.log(error); }); - } - - - // DependemtDropdown field end - - // Dependemt Dropdown field start - - - productdependentData: any; - dependet2product(item) { - this.mainService.getproductDependent(item).subscribe((data) => { - console.log(data); - this.productdependentData = data; - }, (error) => { console.log(error); }); - } - - - // DependemtDropdown field end - - isValidemail_address(email: string): boolean { - const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; - return emailPattern.test(email); - } - - rsModalcustomer_address = false; - goToReplaceStringcustomer_address(row) { - this.rowSelected = row; this.rsModalcustomer_address = true; - } - - selectdeployment_type; - getalldeployment_type() { - this.mainService.getAlldeployment_type().subscribe(data => { - this.selectdeployment_type = data; - console.log(data); - }, (error) => { console.log(error); }); - } - - // calculated field code start - - - - totalquantity; - - - - totalprice; - - - - totaltotal; - totalcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Multiplication" - onInputChangetotal(mode: 'add' | 'edit') { - - - const lastObj = 0 - const lastObjstring = '' - if (mode === 'add') { - - - this.totalquantity = this.entryForm.value.quantity || ''; - - - - this.totalprice = this.entryForm.value.price || ''; - - - - } else { - - - this.totalquantity = this.rowSelected.quantity; - - - - this.totalprice = this.rowSelected.price; - - - } - - - const quantityValue = parseFloat(this.totalquantity) || 0; - - - - const priceValue = parseFloat(this.totalprice) || 0; - - - switch (this.totalcalculateOperators) { - case 'Addition': - this.totaltotal = ( - - - quantityValue + - - - - priceValue + - - - lastObj).toString(); - break; - case 'Subtraction': - this.totaltotal = ( - - - quantityValue - - - - - priceValue - - - - lastObj).toString(); - break; - case 'Multiplication': - this.totaltotal = ( - - - quantityValue * - - - - priceValue * - - - 1).toString(); - - break; - case 'Division': - - this.totaltotal = ( - - - quantityValue / - - - - priceValue / - - - 1).toString(); - - break; - case 'Concatination': - this.totaltotal = ` - - - ${this.totalquantity || ''} - - - - ${this.totalprice || ''} - - - ${lastObjstring || ''}`; - - break; - default: - this.totaltotal = ''; - } - } - - - rsModaldescription = false; - goToReplaceStringdescription(row) { - this.rowSelected = row; this.rsModaldescription = true; - } - - isValidPhone_number(phone: string): boolean { - const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; - return phonePattern.test(phone); - } - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - orderSummary: any[] = []; - - /** - * Add selected product to order summary - */ - addToOrder() { - const formValue = this.entryForm.value; - if (!formValue.product || !formValue.price || !formValue.quantity) { - this.toastr.error('Please select product, price and quantity'); - return; - } - // Get description from master (productdependentData) - let productDesc = ''; - if (this.productdependentData && Array.isArray(this.productdependentData)) { - const found = this.productdependentData.find(p => p.product_name === formValue.product); - if (found && found.description) { - productDesc = found.description; - } - } - const line = this.orderSummary.length + 1; - const orderItem = { - line: line, - product: formValue.product, - description: productDesc, // always use master description - unitPrice: Number(formValue.price), - quantity: Number(formValue.quantity), - total: Number(formValue.price) * Number(formValue.quantity) - }; - this.orderSummary.push(orderItem); - this.entryForm.patchValue({ - product: null, - price: null, - quantity: 1 - }); - this.totaltotal = ''; - } - - /** - * Remove item from order summary by index - */ - removeFromOrder(index: number) { - this.orderSummary.splice(index, 1); - // Recalculate line numbers - this.orderSummary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getSubtotal(): number { - return this.orderSummary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getGST(): number { - return this.getSubtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getGrandTotal(): number { - return this.getSubtotal() + this.getGST(); - } - // ================== ORDER SUMMARY LOGIC END ================== -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.service.ts deleted file mode 100644 index a12fae0..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information.service.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Customer_informationservice{ - private baseURL = "Customer_information/Customer_information" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -getAllmanufacturer(): Observable { -return this.apiRequest.get("Manufacturer_ListFilter1/Manufacturer_ListFilter1"); } - - - - gettypeDependent(field: string): Observable { - return this.apiRequest.get("Types_ListFilter1/Types_ListFilter11/" + field); - } - - - - - - getproductDependent(field: string): Observable { - return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field); - } - - - - - - - -getAlldeployment_type(): Observable { -return this.apiRequest.get("Deployment_type_ListFilter1/Deployment_type_ListFilter1"); } - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information_cardvariable.ts deleted file mode 100644 index c036c4b..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Customer_information/Customer_information_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Customer_informationcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.html deleted file mode 100644 index 81e2b89..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.html +++ /dev/null @@ -1,315 +0,0 @@ - -
-
-
-

Deployment type

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Deployment Type - - - - - - Action - - - - - -{{user.deployment_type }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.ts deleted file mode 100644 index cca1486..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Deployment_typeservice} from './Deployment_type.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Deployment_typecardvariable } from './Deployment_type_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Deployment_type', - templateUrl: './Deployment_type.component.html', - styleUrls: ['./Deployment_type.component.scss'] -}) -export class Deployment_typeComponent implements OnInit { - cardButton = Deployment_typecardvariable.cardButton; - cardmodeldata = Deployment_typecardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Deployment_typecardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Deployment_type_formCode' -tableName = 'Deployment_type'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Deployment_typeservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -deployment_type : [null], - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Deployment_type_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -// updateaction -} - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.service.ts deleted file mode 100644 index e0d4347..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type.service.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Deployment_typeservice{ - private baseURL = "Deployment_type/Deployment_type" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type_cardvariable.ts deleted file mode 100644 index a843bca..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Deployment_type/Deployment_type_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Deployment_typecardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.html deleted file mode 100644 index 96f9833..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.html +++ /dev/null @@ -1,688 +0,0 @@ - -
-
-
-

Dv2

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - - - test3 - - - - - name - - - - - last_name - - - - - - - - - test - - - - - - - Currency - - - - Currency2 - - - - QRCode Field - - - - QRCode Field2 - - - - BarCode Field - - - - BarCode Field2 - - - - - - - - Action - - - - - - - -{{user. test3}} - - - -{{user. name}} - - - -{{user. last_name}} - - - - - - - -{{user. test}} - - - - - -{{user.currency }} - - -{{user.currency2 }} - - -{{user.qrcode_field }} - - -{{user.qrcode_field2 }} - - -{{user.barcode_field }} - - -{{user.barcode_field2 }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.ts deleted file mode 100644 index 995f9a3..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.component.ts +++ /dev/null @@ -1,471 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Dv2service} from './Dv2.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Dv2cardvariable } from './Dv2_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Dv2', - templateUrl: './Dv2.component.html', - styleUrls: ['./Dv2.component.scss'] -}) -export class Dv2Component implements OnInit { - cardButton = Dv2cardvariable.cardButton; - cardmodeldata = Dv2cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Dv2cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Dv2_formCode' -tableName = 'Dv2'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Dv2service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - - -test3:[null], - - - -name:[null], - - - -last_name:[null], - - - - - -test:[null], - - - -currency : [null, { updateOn: 'blur' }], - -currency2 : [null, { updateOn: 'blur' }], - -qrcode_field : [null], - -qrcode_field2 : [null], - -barcode_field : [null], - -barcode_field2 : [null], - - - - - - - - - - - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Dv2_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - - - - // bar code field start - setTimeout(function(){ - JsBarcode("#barcodebarcode_field", row?.barcode_field); - }, 500); - // bar code field start - - // bar code field start - setTimeout(function(){ - JsBarcode("#barcodebarcode_field2", row?.barcode_field2); - }, 500); - // bar code field start - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - -//currency field start - formatCurrencycurrency () { - // Format the currency with two decimal places - this.rowSelected.currency = Number(this.rowSelected.currency ).toFixed(2); - // Remove commas from the formatted currency - this.rowSelected.currency = this.rowSelected.currency?.replace(/,/g, ''); } - //currency field end - -//currency field start - formatCurrencycurrency2 () { - // Format the currency with two decimal places - this.rowSelected.currency2 = Number(this.rowSelected.currency2 ).toFixed(2); - // Remove commas from the formatted currency - this.rowSelected.currency2 = this.rowSelected.currency2?.replace(/,/g, ''); } - //currency field end - - - - - -//bar code field start - generateBarcodebarcode_field(value) { - const barcodeValue = value; - const barcodeElement = document.getElementById("barcodebarcode_field"); - if (barcodeElement) { if (barcodeValue) { - JsBarcode(barcodeElement, barcodeValue, { format: "CODE128" - }); } else { - // Clear the barcode if the input is empty - barcodeElement.innerHTML = ''; } } } - // bar code field end - -//bar code field start - generateBarcodebarcode_field2(value) { - const barcodeValue = value; - const barcodeElement = document.getElementById("barcodebarcode_field2"); - if (barcodeElement) { if (barcodeValue) { - JsBarcode(barcodeElement, barcodeValue, { format: "CODE128" - }); } else { - // Clear the barcode if the input is empty - barcodeElement.innerHTML = ''; } } } - // bar code field end - - - -// updateaction -} - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.service.ts deleted file mode 100644 index 39b761c..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2.service.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Dv2service{ - private baseURL = "Dv2/Dv2" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2_cardvariable.ts deleted file mode 100644 index d4c379f..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Dv2/Dv2_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Dv2cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.html deleted file mode 100644 index 8938317..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.html +++ /dev/null @@ -1,347 +0,0 @@ - -
-
-
-

Manufacturer

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Manufacturer name - - - - Description - - - - - - Action - - - - - -{{user.manufacturer_name }} - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.ts deleted file mode 100644 index 7cdffee..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component.ts +++ /dev/null @@ -1,251 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Manufacturerservice} from './Manufacturer.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Manufacturercardvariable } from './Manufacturer_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Manufacturer', - templateUrl: './Manufacturer.component.html', - styleUrls: ['./Manufacturer.component.scss'] -}) -export class ManufacturerComponent implements OnInit { - cardButton = Manufacturercardvariable.cardButton; - cardmodeldata = Manufacturercardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Manufacturercardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Manufacturer_formCode' -tableName = 'Manufacturer'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Manufacturerservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -manufacturer_name : [null], - -description : [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Manufacturer_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; - goToReplaceStringdescription (row){ - this.rowSelected = row; this.rsModaldescription =true; } - -// updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.service.ts deleted file mode 100644 index 3464c0b..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Manufacturerservice{ - private baseURL = "Manufacturer/Manufacturer" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer_cardvariable.ts deleted file mode 100644 index d57ae46..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Manufacturer/Manufacturer_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Manufacturercardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.html deleted file mode 100644 index 95feb06..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.html +++ /dev/null @@ -1,445 +0,0 @@ - -
-
-
-

Order summary

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Product - - - - Description - - - - Unit Price - - - - Quantity - - - - Total - - - - - - Action - - - - - -{{user.product }} - - - - - - -{{user.unit_price }} - - -{{user.quantity }} - - -{{user.total }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.ts deleted file mode 100644 index ef2a3ae..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.component.ts +++ /dev/null @@ -1,323 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Order_summaryservice} from './Order_summary.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Order_summarycardvariable } from './Order_summary_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Order_summary', - templateUrl: './Order_summary.component.html', - styleUrls: ['./Order_summary.component.scss'] -}) -export class Order_summaryComponent implements OnInit { - cardButton = Order_summarycardvariable.cardButton; - cardmodeldata = Order_summarycardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Order_summarycardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Order_summary_formCode' -tableName = 'Order_summary'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Order_summaryservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -product : [null], - -description : [null], - -unit_price : [null,[Validators.required]], - -quantity : [null,[Validators.required]], - -total : [null,[Validators.required]], - - - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Order_summary_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - - - - - -// updateaction -} - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.service.ts deleted file mode 100644 index e671e45..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary.service.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Order_summaryservice{ - private baseURL = "Order_summary/Order_summary" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary_cardvariable.ts deleted file mode 100644 index 4f02dc9..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Order_summary/Order_summary_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Order_summarycardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.html deleted file mode 100644 index 7111442..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.html +++ /dev/null @@ -1,396 +0,0 @@ - -
-
-
-

Product

-
-
- - - -
-
- - - - Loading ... - -
{{error}}
-
- - Product Name - - - - Type name - - - Price - - - Description - - - - - Action - - - - - - {{user.product_name }} - - - {{user.type_name }} - {{user.price }} - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
- File Preview -
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.ts deleted file mode 100644 index 594e004..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.component.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Productservice } from './Product.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Productcardvariable } from './Product_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Product', - templateUrl: './Product.component.html', - styleUrls: ['./Product.component.scss'] -}) -export class ProductComponent implements OnInit { - cardButton = Productcardvariable.cardButton; - cardmodeldata = Productcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Productcardvariable.cardButton; - cardmodal; changeView() { - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected: any = {}; - modaldelete = false; - modalEdit = false; - modalAdd = false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine: any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Product_formCode' - tableName = 'Product'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, - private userInfoService: UserInfoService, - private mainService: Productservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; - // component button - ngOnInit(): void { - if (this.cardmodeldata !== '') { - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole = this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - product_name: [null], - - type_name: [null], - description: [null], - price: [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Product_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; - this.product = [...this.product].reverse(); if (this.product.length == 0) { - this.error = "No Data Available" - } - }, (error) => { - console.log(error); - if (error) { - this.error = "Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete = true; - } - delete(id) { - this.modaldelete = false; - console.log("in delete " + id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - onCreate() { - this.modalAdd = false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { - this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; - onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - } this.onCreate(); - - } - - rsModaldescription = false; - goToReplaceStringdescription(row) { - this.rowSelected = row; - this.rsModaldescription = true; - } - - - // updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.service.ts deleted file mode 100644 index 2408363..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Productservice{ - private baseURL = "Product/Product" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product_cardvariable.ts deleted file mode 100644 index d01e2f1..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Product/Product_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Productcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.html deleted file mode 100644 index 3995fc0..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.html +++ /dev/null @@ -1,349 +0,0 @@ - -
-
-
-

Support

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - Description - - - - - - Action - - - - - -{{user.name }} - - - - - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.ts deleted file mode 100644 index 9af1ee4..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.component.ts +++ /dev/null @@ -1,251 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Supportservice} from './Support.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Supportcardvariable } from './Support_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Support', - templateUrl: './Support.component.html', - styleUrls: ['./Support.component.scss'] -}) -export class SupportComponent implements OnInit { - cardButton = Supportcardvariable.cardButton; - cardmodeldata = Supportcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Supportcardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Support_formCode' -tableName = 'Support'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Supportservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -description : [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Support_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - -// updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.service.ts deleted file mode 100644 index d3f45f1..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Supportservice{ - private baseURL = "Support/Support" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support_cardvariable.ts deleted file mode 100644 index 544e78a..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Support/Support_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Supportcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.html deleted file mode 100644 index 97ccc19..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.html +++ /dev/null @@ -1,344 +0,0 @@ - -
-
-
-

Types

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Type Name - - - - Manufacturer - - - - - - Action - - - - - -{{user.type_name }} - - -{{user.manufacturer }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.scss deleted file mode 100644 index c47b921..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -//@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; -} diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.ts deleted file mode 100644 index 167465c..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.component.ts +++ /dev/null @@ -1,249 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Typesservice} from './Types.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Typescardvariable } from './Types_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Types', - templateUrl: './Types.component.html', - styleUrls: ['./Types.component.scss'] -}) -export class TypesComponent implements OnInit { - cardButton = Typescardvariable.cardButton; - cardmodeldata = Typescardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Typescardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Types_formCode' -tableName = 'Types'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Typesservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -type_name : [null], - -manufacturer : [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Types_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - - - -// updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.service.ts deleted file mode 100644 index 8f1c9d6..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Typesservice{ - private baseURL = "Types/Types" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types_cardvariable.ts deleted file mode 100644 index 057f1f8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/angulardatatype/Types/Types_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Typescardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.html deleted file mode 100644 index 2851261..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.html +++ /dev/null @@ -1,523 +0,0 @@ - -
-
-
-

Defatest

-
-
- - - -
-
- - - - Loading ... - -
{{error}}
-
- - Name - - - - Description - - - - Active - - - - select Field - - - - - - Action - - - - - - {{user.name }} - - - - - - - {{user.active }} - - - {{user. select_fieldidentifier}} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
- File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.ts deleted file mode 100644 index 7bfe2f6..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.component.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Defatestservice } from './Defatest.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Defatestcardvariable } from './Defatest_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Defatest', - templateUrl: './Defatest.component.html', - styleUrls: ['./Defatest.component.scss'] -}) -export class DefatestComponent implements OnInit { - cardButton = Defatestcardvariable.cardButton; - cardmodeldata = Defatestcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Defatestcardvariable.cardButton; - cardmodal; changeView() { - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected: any = {}; - modaldelete = false; - modalEdit = false; - modalAdd = false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine: any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Defatest_formCode' - tableName = 'Defatest'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, - private userInfoService: UserInfoService, - private mainService: Defatestservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; - // component button - ngOnInit(): void { - if (this.cardmodeldata !== '') { - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole = this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ - name: [null], - - description: [null], - - active: [true], - - select_field: [null], - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Defatest_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - this.getallselect_field(); - - - - if (this.select_fielddefault) { - // Listen for product changes to auto-fill description - - - - this.entryForm.get('select_field')?.valueChanges.subscribe(name => { - if (name && this.selectselect_field) { - - const found = this.selectselect_field.find(p => p.name === name); - - - - console.log('found is ', found); - - // Auto-fill price when product is selected - if (found && found.description) { - this.entryForm.patchValue({ description: found.description }); - } else { - this.entryForm.patchValue({ description: null }); - } - - } - }); - } - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; - this.product = [...this.product].reverse(); if (this.product.length == 0) { - this.error = "No Data Available" - } - }, (error) => { - console.log(error); - if (error) { - this.error = "Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete = true; - } - delete(id) { - this.modaldelete = false; - console.log("in delete " + id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - onCreate() { - this.modalAdd = false; - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } - setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { - this.modalAdd = true; this.submitted = false; - - - - - - - - - } - submitted = false; - onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - } this.onCreate(); - - } - - - rsModaldescription = false; - goToReplaceStringdescription(row) { - this.rowSelected = row; this.rsModaldescription = true; - } - - - - select_fielddefault = true - selectselect_field; - getallselect_field() { - this.mainService.getAllselect_field().subscribe(data => { - this.selectselect_field = data; - console.log(data); - }, (error) => { console.log(error); }); - } - - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - select_fieldSummary: any[] = []; - select_fieldtotal; - isselect_fieldorder = true; - /** - * Add selected product to order summary - */ - addselect_fieldOrder() { - const formValue = this.entryForm.value; - if (!formValue.select_field) { - this.toastr.error('Please select select Field'); - return; - } - // Get description from master (selectselect_field) - - - - let select_fieldname = ''; - - - - let select_fielddescription = ''; - - - - - if (this.selectselect_field && Array.isArray(this.selectselect_field)) { - - - const found = this.selectselect_field.find(p => p.name === formValue.select_field); - - - - - - if (found && found.name) { - select_fieldname = found.name; - } - - - - - if (found && found.description) { - select_fielddescription = found.description; - } - - - - } - const line = this.select_fieldSummary.length + 1; - const orderItem = { - line: line, - - - name: select_fieldname, // always use master description - - - - - description: select_fielddescription, // always use master description - - - - // unitPrice: Number(formValue.price), - // quantity: Number(formValue.quantity), - // total: Number(formValue.price) * Number(formValue.quantity) - }; - this.select_fieldSummary.push(orderItem); - - this.select_fieldtotal = ''; - } - - /** - * Remove item from order summary by index - */ - removeselect_fieldOrder(index: number) { - this.select_fieldSummary.splice(index, 1); - // Recalculate line numbers - this.select_fieldSummary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getselect_fieldSubtotal(): number { - return this.select_fieldSummary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getselect_fieldGST(): number { - return this.getselect_fieldSubtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getselect_fieldGrandTotal(): number { - return this.getselect_fieldSubtotal() + this.getselect_fieldGST(); - - } - // ================== ORDER SUMMARY LOGIC END ================== - - - // updateaction -} - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.service.ts deleted file mode 100644 index 77625fd..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest.service.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Defatestservice{ - private baseURL = "Defatest/Defatest" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - -getAllselect_field(): Observable { -return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest_cardvariable.ts deleted file mode 100644 index f1bb60f..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/defu/Defatest/Defatest_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Defatestcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.html deleted file mode 100644 index 75c7b56..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.html +++ /dev/null @@ -1,376 +0,0 @@ - -
-
-
-

Childform

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - Description - - - - Active - - - - - - Action - - - - - -{{user.name }} - - - - - - -{{user.active }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.ts deleted file mode 100644 index 6a60776..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.component.ts +++ /dev/null @@ -1,275 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Childformservice} from './Childform.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Childformcardvariable } from './Childform_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Childform', - templateUrl: './Childform.component.html', - styleUrls: ['./Childform.component.scss'] -}) -export class ChildformComponent implements OnInit { - cardButton = Childformcardvariable.cardButton; - cardmodeldata = Childformcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Childformcardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Childform_formCode' -tableName = 'Childform'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Childformservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -description : [null], - -active : [true], - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Childform_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - -// updateaction -} - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.service.ts deleted file mode 100644 index 3c8571d..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform.service.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Childformservice{ - private baseURL = "Childform/Childform" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform_cardvariable.ts deleted file mode 100644 index 8809902..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stpkg/Childform/Childform_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Childformcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.html deleted file mode 100644 index eb002f3..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.html +++ /dev/null @@ -1,383 +0,0 @@ - -
-
-
-

Country

-
-
- - - - - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - Description - - - - Active - - - - - - Action - - - - - -{{user.name }} - - - - - - -{{user.active }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.ts deleted file mode 100644 index 9a72264..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.component.ts +++ /dev/null @@ -1,293 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Countryservice} from './Country.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Countrycardvariable } from './Country_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -import { ActivatedRoute, Router } from '@angular/router'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Country', - templateUrl: './Country.component.html', - styleUrls: ['./Country.component.scss'] -}) -export class CountryComponent implements OnInit { - cardButton = Countrycardvariable.cardButton; - cardmodeldata = Countrycardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Countrycardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Country_formCode' -tableName = 'Country'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Countryservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - private router: Router, - private route: ActivatedRoute ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -description : [null], - -active : [true], - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Country_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - - goToDataM(){ - this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); - } - - -downloadCSV(tableName): void { - this.mainService.downloadCSV(tableName).subscribe(response => { - const blob = new Blob([response], { type: 'application/octet-stream' }); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = `${tableName}.csv`; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - }); -}// updateaction -} - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.service.ts deleted file mode 100644 index 786c0b2..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country.service.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -import baseUrl from 'src/app/services/api/helper'; -@Injectable({ - providedIn: 'root' -}) -export class Countryservice{ - private baseURL = "Country/Country" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - -downloadCSV(tableName: string): Observable { - const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; - return this.http.get(url, { responseType: 'blob' }) - -}// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country_cardvariable.ts deleted file mode 100644 index efc9e50..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Country/Country_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Countrycardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.html deleted file mode 100644 index cd24628..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.html +++ /dev/null @@ -1,412 +0,0 @@ - -
-
-
-

District

-
-
- - - - - - -
- - - - Loading ... - -
{{error}}
-
- - district name - - - - Description - - - - Active - - - - state name - - - - - - Action - - - - - -{{user.district_name }} - - - - - - -{{user.active }} - - -{{user.state_name }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.ts deleted file mode 100644 index 0f347e0..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.component.ts +++ /dev/null @@ -1,317 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Districtservice} from './District.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Districtcardvariable } from './District_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -import { ActivatedRoute, Router } from '@angular/router'; -declare var JsBarcode: any; -@Component({ - selector: 'app-District', - templateUrl: './District.component.html', - styleUrls: ['./District.component.scss'] -}) -export class DistrictComponent implements OnInit { - cardButton = Districtcardvariable.cardButton; - cardmodeldata = Districtcardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Districtcardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'District_formCode' -tableName = 'District'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Districtservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - private router: Router, - private route: ActivatedRoute ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -district_name : [null], - -description : [null], - -active : [true], - -state_name : [null], - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "District_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - - - - goToDataM(){ - this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); - } - - -downloadCSV(tableName): void { - this.mainService.downloadCSV(tableName).subscribe(response => { - const blob = new Blob([response], { type: 'application/octet-stream' }); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = `${tableName}.csv`; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - }); -}// updateaction -} - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.service.ts deleted file mode 100644 index 3ce9204..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -import baseUrl from 'src/app/services/api/helper'; -@Injectable({ - providedIn: 'root' -}) -export class Districtservice{ - private baseURL = "District/District" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - -downloadCSV(tableName: string): Observable { - const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; - return this.http.get(url, { responseType: 'blob' }) - -}// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District_cardvariable.ts deleted file mode 100644 index 7dd47dd..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/District/District_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Districtcardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.html deleted file mode 100644 index 48e4a66..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.html +++ /dev/null @@ -1,412 +0,0 @@ - -
-
-
-

State

-
-
- - - - - - -
- - - - Loading ... - -
{{error}}
-
- - state name - - - - Description - - - - Active - - - - country name - - - - - - Action - - - - - -{{user.state_name }} - - - - - - -{{user.active }} - - -{{user.country_name }} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.ts deleted file mode 100644 index de1a50e..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.component.ts +++ /dev/null @@ -1,317 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Stateservice} from './State.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Statecardvariable } from './State_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -import { ActivatedRoute, Router } from '@angular/router'; -declare var JsBarcode: any; -@Component({ - selector: 'app-State', - templateUrl: './State.component.html', - styleUrls: ['./State.component.scss'] -}) -export class StateComponent implements OnInit { - cardButton = Statecardvariable.cardButton; - cardmodeldata = Statecardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Statecardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'State_formCode' -tableName = 'State'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Stateservice, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - private router: Router, - private route: ActivatedRoute ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -state_name : [null], - -description : [null], - -active : [true], - -country_name : [null], - - - - - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "State_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - - - - - - - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -rsModaldescription = false; -goToReplaceStringdescription(row){ -this.rowSelected = row; this.rsModaldescription =true; } - - - - - - goToDataM(){ - this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); - } - - -downloadCSV(tableName): void { - this.mainService.downloadCSV(tableName).subscribe(response => { - const blob = new Blob([response], { type: 'application/octet-stream' }); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = `${tableName}.csv`; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - }); -}// updateaction -} - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.service.ts deleted file mode 100644 index bb13104..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -import baseUrl from 'src/app/services/api/helper'; -@Injectable({ - providedIn: 'root' -}) -export class Stateservice{ - private baseURL = "State/State" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - - - - - - - -downloadCSV(tableName: string): Observable { - const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; - return this.http.get(url, { responseType: 'blob' }) - -}// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State_cardvariable.ts deleted file mode 100644 index fce7bf8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/State/State_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Statecardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.html b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.html deleted file mode 100644 index b0c32f7..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.html +++ /dev/null @@ -1,432 +0,0 @@ - -
-
-
-

Test2

-
-
- - - -
- - - - Loading ... - -
{{error}}
-
- - Name - - - - country - - - - - - Action - - - - - -{{user.name }} - - -{{user. countryidentifier}} - - - - - - - -
Who Column
-
Account ID: {{user.accountId}}
-
Created At: {{user.createdAt| date}}
-
Created By: {{user.createdBy}}
-
Updated At: {{user.updatedAt | date}}
-
Updated By: {{user.updatedBy}}
-
-
-
- - - - - - - -
- - - Users per page - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} - of {{pagination.totalItems}} users - - -
- - - -
-
-
-
-
-
- -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] }} - {{afterText(item.fieldtext)}} -
- -
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ] | date}} - {{afterText(item.fieldtext)}} -
-
- {{beforeText(item.fieldtext)}} - {{ app[transform(item.fieldtext) ]}} - {{afterText(item.fieldtext)}} -
- -
-
-
- - -
- -
- -
File Preview
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.scss b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.scss deleted file mode 100644 index 12f7fc8..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.scss +++ /dev/null @@ -1,85 +0,0 @@ -//@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; -} -.universal-section-header { - margin: 24px 0 10px 0; - font-weight: 600; - color: #1a237e; - letter-spacing: 0.5px; - font-size: 1.25rem; -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.ts deleted file mode 100644 index 16edb30..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.component.ts +++ /dev/null @@ -1,389 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { AlertService } from 'src/app/services/alert.service'; -import { Test2service} from './Test2.service'; -import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; -import { ExtensionService } from 'src/app/services/fnd/extension.service'; -import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; -import { Test2cardvariable } from './Test2_cardvariable'; -import { UserInfoService } from 'src/app/services/user-info.service'; -declare var JsBarcode: any; -@Component({ - selector: 'app-Test2', - templateUrl: './Test2.component.html', - styleUrls: ['./Test2.component.scss'] -}) -export class Test2Component implements OnInit { - cardButton = Test2cardvariable.cardButton; - cardmodeldata = Test2cardvariable.cardmodeldata; - public dashboardArray: DashboardContentModel2[]; - isCardview = Test2cardvariable.cardButton; - cardmodal; changeView(){ - this.isCardview = !this.isCardview; - } - beforeText(fieldtext: string): string { // Extract the text before the first '<' - const index = fieldtext.indexOf('<'); - return index !== -1 ? fieldtext.substring(0, index) : fieldtext; - } - afterText(fieldtext: string): string { // Extract the text after the last '>' - const index = fieldtext.lastIndexOf('>'); - return index !== -1 ? fieldtext.substring(index + 1) : ''; - } - transform(fieldtext: string): string { - const match = fieldtext.match(/<([^>]*)>/); - return match ? match[1] : ''; // Extract the text between '<' and '>' - } - userrole; - rowSelected :any= {}; - modaldelete=false; - modalEdit=false; - modalAdd= false; - public entryForm: FormGroup; - loading = false; - product; - modalOpenedforNewLine = false; - newLine:any; - additionalFieldsFromBackend: any[] = []; - formcode = 'Test2_formCode' -tableName = 'Test2'; checkFormCode; selected: any[] = []; constructor( - private extensionService: ExtensionService, -private userInfoService:UserInfoService, - private mainService:Test2service, - private alertService: AlertService, - private toastr: ToastrService, - private _fb: FormBuilder, - ) { } - private editInterval: any; -// component button - ngOnInit(): void { - if(this.cardmodeldata !== ''){ - this.cardmodal = JSON.parse(this.cardmodeldata); - this.dashboardArray = this.cardmodal.dashboard.slice(); - console.log(this.dashboardArray) - } - this.userrole=this.userInfoService.getRoles(); - this.getData(); - this.entryForm = this._fb.group({ -name : [null], - -country : [null], - - - - - - - }); // component_button200 - // form code start - this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { - console.log(data); - const jsonArray = data.map((str) => JSON.parse(str)); - this.additionalFieldsFromBackend = jsonArray; - this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Test2_formCode"); - console.log(this.checkFormCode); - console.log(this.additionalFieldsFromBackend); - if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { - this.additionalFieldsFromBackend.forEach(field => { - if (field.formCode === this.formcode) { - if (!this.entryForm.contains(field.extValue)) { - // Add the control only if it doesn't exist in the form - this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); - } - } - }); - } - }); - console.log(this.entryForm.value); - // form code end - - -this.getallcountry(); - - - - if (this.countrydefault) { - // Listen for product changes to auto-fill description - this.entryForm.get('country')?.valueChanges.subscribe(name => { - if (name && this.selectcountry) { - - const found = this.selectcountry.find(p => p.Description === name); - - console.log('found is ', found); - - // Auto-fill price when product is selected - if (found && found.Name) { - this.entryForm.patchValue({ Name: found.Description }); - } else { - this.entryForm.patchValue({ Name: null }); - } - - } - }); -} - - - } - ngOnDestroy(): void { - if (this.editInterval) { - clearInterval(this.editInterval); - } - } - - - - error; - getData() { - this.mainService.getAll().subscribe((data) => { - console.log(data); - this.product = data; -this.product = [...this.product].reverse(); if(this.product.length==0){ - this.error="No Data Available" - } - },(error) => { - console.log(error); - if(error){ - this.error="Server Error"; - } - }); - } - onEdit(row) { - this.rowSelected = row; - - - - - - this.modalEdit = true; - } - onDelete(row) { - this.rowSelected = row; - this.modaldelete=true; - } - delete(id) - { - this.modaldelete = false; - console.log("in delete "+id); - this.mainService.delete(id).subscribe( - (data) => { - console.log(data); - this.ngOnInit(); - if (data) { this.toastr.success('Deleted successfully'); } - }); - } - onUpdate(id) { - this.modalEdit = false; - - - - - //console.log("in update"); - console.log("id " + id); - console.log(this.rowSelected); - //console.log("out update"); - this.mainService.update(id, this.rowSelected).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Update Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("update Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Updated"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Updated"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } -onCreate() { - this.modalAdd=false; - - - - - this.mainService.create(this.entryForm.value).subscribe( - (data) => { - console.log(data); - if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("Added Successfully"); - } -setTimeout(() => { - this.ngOnInit(); - }, 500); - - - - - }, (error) => { - console.log(error); - if (error.status >= 200 && error.status <= 299) { - // this.toastr.success("Added Succesfully"); - } - if (error.status >= 400 && error.status <= 499) { - this.toastr.error("Not Added"); - } - if (error.status >= 500 && error.status <= 599) { - this.toastr.error("Not Added"); - } - }); - setTimeout(() => { - this.ngOnInit(); - }, 500); - } - goToAdd(row) { -this.modalAdd = true; this.submitted = false; - - - - - } - submitted = false; -onSubmit() { - console.log(this.entryForm.value); - this.submitted = true; - if (this.entryForm.invalid) { - return; - }this.onCreate(); - -} - - -countrydefault=true -selectcountry ; -getallcountry() { - this.mainService.getAllcountry().subscribe(data=>{ -this.selectcountry = data; -console.log(data); -},(error) => { console.log(error); }); } - - - - // ================== ORDER SUMMARY LOGIC START ================== - /** - * Order Summary Array and Methods for Add to Order functionality - */ - countrySummary: any[] = []; - countrytotal; -iscountryorder =true; - /** - * Add selected product to order summary - */ - addcountryOrder() { - const formValue = this.entryForm.value; - if (!formValue.country ) { - this.toastr.error('Please select country'); - return; - } - // Get description from master (selectcountry) - - - - let countryname= ''; - - - - let countrydescription= ''; - - - - - if (this.selectcountry && Array.isArray(this.selectcountry)) { - - - const found = this.selectcountry.find(p => p.name === formValue.country); - - - - - - if (found && found.name) { - countryname = found.name; - } - - - - - if (found && found.description) { - countrydescription = found.description; - } - - - - } - const line = this.countrySummary.length + 1; - const orderItem = { - line: line, - - - name: countryname, // always use master description - - - - - description: countrydescription, // always use master description - - - - // unitPrice: Number(formValue.price), - // quantity: Number(formValue.quantity), - // total: Number(formValue.price) * Number(formValue.quantity) - }; - this.countrySummary.push(orderItem); - - this.countrytotal = ''; - } - - /** - * Remove item from order summary by index - */ - removecountryOrder(index: number) { - this.countrySummary.splice(index, 1); - // Recalculate line numbers - this.countrySummary.forEach((item, i) => { - item.line = i + 1; - }); - } - - /** - * Calculate subtotal of all order items - */ - getcountrySubtotal(): number { - return this.countrySummary.reduce((sum, item) => sum + item.total, 0); - } - - /** - * Calculate GST (18%) - */ - getcountryGST(): number { - return this.getcountrySubtotal() * 0.18; - } - - /** - * Calculate grand total (subtotal + GST) - */ - getcountryGrandTotal(): number { - return this.getcountrySubtotal() + this.getcountryGST(); - - } - // ================== ORDER SUMMARY LOGIC END ================== - - -// updateaction -} - - - diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.service.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.service.ts deleted file mode 100644 index 26a1c69..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from "rxjs"; -import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; -import { ApiRequestService } from "src/app/services/api/api-request.service"; -import { environment } from 'src/environments/environment'; -@Injectable({ - providedIn: 'root' -}) -export class Test2service{ - private baseURL = "Test2/Test2" ; constructor( - private http: HttpClient, - private apiRequest: ApiRequestService, - ) { } - getAll(page?: number, size?: number): Observable { - return this.apiRequest.get(this.baseURL); - } - getById(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.get(_http); - } - create(data: any): Observable { - return this.apiRequest.post(this.baseURL, data); - } - update(id: number, data: any): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.put(_http, data); - } - delete(id: number): Observable { - const _http = this.baseURL + "/" + id; - return this.apiRequest.delete(_http); - } - - -getAllcountry(): Observable { -return this.apiRequest.get("Country_ListFilter1/Country_ListFilter1"); } - -// updateaction -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2_cardvariable.ts b/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2_cardvariable.ts deleted file mode 100644 index c719226..0000000 --- a/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/testdata/Test2/Test2_cardvariable.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const Test2cardvariable = { - "cardButton": false, - "cardmodeldata": `` -} \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 8164773..77d1d67 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,66 +1,4 @@ - - - - - - - - - - - - - - - - - -import { Ad10Component } from './BuilderComponents/angulardatatype/Ad10/Ad10.component'; - - - - - - - - - - - - - - - - - - - - - - -import { DefatestComponent } from './BuilderComponents/defu/Defatest/Defatest.component'; - - -import { ChildformComponent } from './BuilderComponents/stpkg/Childform/Childform.component'; -import { DistrictComponent } from './BuilderComponents/testdata/District/District.component'; -import { StateComponent } from './BuilderComponents/testdata/State/State.component'; -import { CountryComponent } from './BuilderComponents/testdata/Country/Country.component'; -import { Ad9Component } from './BuilderComponents/angulardatatype/Ad9/Ad9.component'; -import { Ad8Component } from './BuilderComponents/angulardatatype/Ad8/Ad8.component'; -import { Ad7Component } from './BuilderComponents/angulardatatype/Ad7/Ad7.component'; -import { Ad6Component } from './BuilderComponents/angulardatatype/Ad6/Ad6.component'; -import { Adv5Component } from './BuilderComponents/angulardatatype/Adv5/Adv5.component'; -import { Adv4Component } from './BuilderComponents/angulardatatype/Adv4/Adv4.component'; -import { SupportComponent } from './BuilderComponents/angulardatatype/Support/Support.component'; -import { Adv3Component } from './BuilderComponents/angulardatatype/Adv3/Adv3.component'; -import { Dv2Component } from './BuilderComponents/angulardatatype/Dv2/Dv2.component'; -import { Adv1Component } from './BuilderComponents/angulardatatype/Adv1/Adv1.component'; -import { Basicp3Component } from './BuilderComponents/angulardatatype/Basicp3/Basicp3.component'; -import { Basicp2Component } from './BuilderComponents/angulardatatype/Basicp2/Basicp2.component'; -import { Basicp1Component } from './BuilderComponents/angulardatatype/Basicp1/Basicp1.component'; - - import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; @@ -148,13 +86,7 @@ import { AllapiregisteryComponent } from './fnd/apiregistery/allapiregistery/all import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component'; import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component'; import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component'; -import { Customer_informationComponent } from './BuilderComponents/angulardatatype/Customer_information/Customer_information.component'; -import { Deployment_typeComponent } from './BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component'; -import { ManufacturerComponent } from './BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component'; -import { Order_summaryComponent } from './BuilderComponents/angulardatatype/Order_summary/Order_summary.component'; -import { ProductComponent } from './BuilderComponents/angulardatatype/Product/Product.component'; -import { TypesComponent } from './BuilderComponents/angulardatatype/Types/Types.component'; -import { Test2Component } from './BuilderComponents/testdata/Test2/Test2.component'; + import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component'; import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component'; import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component'; @@ -349,181 +281,8 @@ const routes: Routes = [ // buildercomponents - - - - - - - { path: 'Country', component: CountryComponent }, - - - { path: 'Adv3', component: Adv3Component }, - - - - - - - - - - - - - - - - - - - - - - - - - - - { path: 'Ad10', component: Ad10Component }, - - - { path: 'Childform', component: ChildformComponent }, - - - { path: 'District', component: DistrictComponent }, - - - { path: 'State', component: StateComponent }, - - - { path: 'Country', component: CountryComponent }, - - - { path: 'Ad9', component: Ad9Component }, - - - { path: 'Ad8', component: Ad8Component }, - - - { path: 'Ad7', component: Ad7Component }, - - - - - - - - - - - - - - - - - - - { path: 'Ad6', component: Ad6Component }, - - - { path: 'Adv5', component: Adv5Component }, - - - { path: 'Support', component: SupportComponent }, - - - { path: 'Adv3', component: Adv3Component }, - - { path: 'tokenregistery', component: Token_registeryComponent }, - - - { path: 'Defatest', component: DefatestComponent }, - - - { path: 'Country', component: CountryComponent }, - - - { path: 'Defatest', component: DefatestComponent }, - - { path: 'Test2', component: Test2Component }, - - - { path: 'Country', component: CountryComponent }, - - - - { path: 'Test2', component: Test2Component }, - - { path: 'Childform', component: ChildformComponent }, - - - { path: 'District', component: DistrictComponent }, - - - { path: 'State', component: StateComponent }, - - - { path: 'Country', component: CountryComponent }, - - - { path: 'Ad9', component: Ad9Component }, - - - { path: 'Ad8', component: Ad8Component }, - - - { path: 'Ad7', component: Ad7Component }, - - - { path: 'Ad6', component: Ad6Component }, - - - { path: 'Adv5', component: Adv5Component }, - - - { path: 'Adv4', component: Adv4Component }, - - - { path: 'Support', component: SupportComponent }, - - - { path: 'Adv3', component: Adv3Component }, - - - { path: 'Dv2', component: Dv2Component }, - - - { path: 'Adv1', component: Adv1Component }, - - - { path: 'Basicp3', component: Basicp3Component }, - - - { path: 'Basicp2', component: Basicp2Component }, - - - { path: 'Basicp1', component: Basicp1Component }, - { path: 'cust', component: Customer_informationComponent }, - - { path: 'Order_summary', component: Order_summaryComponent }, - - - { path: 'Types', component: TypesComponent }, - - - { path: 'Product', component: ProductComponent }, - - - { path: 'Manufacturer', component: ManufacturerComponent }, - - - { path: 'Deployment_type', component: Deployment_typeComponent }, - - - + { path: 'Stepper_workflow', component: Stepper_workflowComponent }, diff --git a/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index d8b4c69..085c45d 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,24 +1,3 @@ -import { Ad10Component } from './BuilderComponents/angulardatatype/Ad10/Ad10.component'; - -import { DefatestComponent } from './BuilderComponents/defu/Defatest/Defatest.component'; - -import { ChildformComponent } from './BuilderComponents/stpkg/Childform/Childform.component'; -import { DistrictComponent } from './BuilderComponents/testdata/District/District.component'; -import { StateComponent } from './BuilderComponents/testdata/State/State.component'; -import { CountryComponent } from './BuilderComponents/testdata/Country/Country.component'; -import { Ad9Component } from './BuilderComponents/angulardatatype/Ad9/Ad9.component'; -import { Ad8Component } from './BuilderComponents/angulardatatype/Ad8/Ad8.component'; -import { Ad7Component } from './BuilderComponents/angulardatatype/Ad7/Ad7.component'; -import { Ad6Component } from './BuilderComponents/angulardatatype/Ad6/Ad6.component'; -import { Adv5Component } from './BuilderComponents/angulardatatype/Adv5/Adv5.component'; -import { Adv4Component } from './BuilderComponents/angulardatatype/Adv4/Adv4.component'; -import { SupportComponent } from './BuilderComponents/angulardatatype/Support/Support.component'; -import { Adv3Component } from './BuilderComponents/angulardatatype/Adv3/Adv3.component'; -import { Dv2Component } from './BuilderComponents/angulardatatype/Dv2/Dv2.component'; -import { Adv1Component } from './BuilderComponents/angulardatatype/Adv1/Adv1.component'; -import { Basicp3Component } from './BuilderComponents/angulardatatype/Basicp3/Basicp3.component'; -import { Basicp2Component } from './BuilderComponents/angulardatatype/Basicp2/Basicp2.component'; -import { Basicp1Component } from './BuilderComponents/angulardatatype/Basicp1/Basicp1.component'; @@ -132,13 +111,7 @@ import { AllapiregisteryComponent } from './fnd/apiregistery/allapiregistery/all import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component'; import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component'; import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component'; -import { Customer_informationComponent } from './BuilderComponents/angulardatatype/Customer_information/Customer_information.component'; -import { Deployment_typeComponent } from './BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component'; -import { ManufacturerComponent } from './BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component'; -import { Order_summaryComponent } from './BuilderComponents/angulardatatype/Order_summary/Order_summary.component'; -import { ProductComponent } from './BuilderComponents/angulardatatype/Product/Product.component'; -import { TypesComponent } from './BuilderComponents/angulardatatype/Types/Types.component'; -import { Test2Component } from './BuilderComponents/testdata/Test2/Test2.component'; + import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component'; import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component'; import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component'; @@ -170,40 +143,16 @@ import { SharedModule } from '../../shared/shared.module'; DatamanagementComponent, DatamananementworkflowComponent, BulkimportComponent, BulkimportallComponent, BulkimportaddComponent, BulkimporteditComponent, BulkimportlineComponent, BulkimporteditlineComponent, MappingruleComponent, MappingruleallComponent, MappingruleaddComponent, MappingruleeditComponent, Stepper_workflowComponent, Customer_informationComponent, + ThemeCustomizationComponent, // FileUploadListComponent, // buildercomponents - ThemeCustomizationComponent, - Ad10Component, - Token_registeryComponent, - DefatestComponent, - Test2Component, - Order_summaryComponent, - TypesComponent, - ProductComponent, - ManufacturerComponent, - Deployment_typeComponent, - ChildformComponent, - DistrictComponent, - StateComponent, - CountryComponent, - Ad9Component, - Ad8Component, - Ad7Component, - Ad6Component, - Adv5Component, - Adv4Component, - SupportComponent, - Adv3Component, - Dv2Component, - Adv1Component, - Basicp3Component, - Basicp2Component, - Basicp1Component, - ], + + + ], imports: [ QRCodeModule, CommonModule,