From 80c9b4808eaed9180880dd12d9d26cdb1d7cda89 Mon Sep 17 00:00:00 2001 From: DhaaraniCIT Date: Tue, 5 Nov 2024 10:36:11 +0530 Subject: [PATCH 1/2] PR comments fix --- .../qbd-direct-connector.service.spec.ts | 15 +++++++++++++++ ...service.ts => qbd-direct-connector.service.ts} | 2 +- ...bd-direct-connector.service.ts.service.spec.ts | 15 --------------- .../chechbox-button.component.html | 1 - .../chechbox-button/chechbox-button.component.ts | 12 ------------ .../checkbox-button.component.html | 1 + .../checkbox-button.component.scss} | 0 .../checkbox-button.component.spec.ts} | 12 ++++++------ .../checkbox-button/checkbox-button.component.ts | 12 ++++++++++++ 9 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.spec.ts rename src/app/core/services/qbd-direct/qbd-direct-configuration/{qbd-direct-connector.service.ts.service.ts => qbd-direct-connector.service.ts} (67%) delete mode 100644 src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.spec.ts delete mode 100644 src/app/shared/components/input/chechbox-button/chechbox-button.component.html delete mode 100644 src/app/shared/components/input/chechbox-button/chechbox-button.component.ts create mode 100644 src/app/shared/components/input/checkbox-button/checkbox-button.component.html rename src/app/shared/components/input/{chechbox-button/chechbox-button.component.scss => checkbox-button/checkbox-button.component.scss} (100%) rename src/app/shared/components/input/{chechbox-button/chechbox-button.component.spec.ts => checkbox-button/checkbox-button.component.spec.ts} (51%) create mode 100644 src/app/shared/components/input/checkbox-button/checkbox-button.component.ts diff --git a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.spec.ts b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.spec.ts new file mode 100644 index 000000000..1ca6255f1 --- /dev/null +++ b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed } from '@angular/core/testing'; +import { QbdDirectConnectorService } from './qbd-direct-connector.service'; + +describe('QbdDirectConnectorService', () => { + let service: QbdDirectConnectorService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(QbdDirectConnectorService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.ts b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts similarity index 67% rename from src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.ts rename to src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts index ed04507ad..e8cc109fd 100644 --- a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.ts +++ b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) -export class QbdDirectConnectorServiceTsService { +export class QbdDirectConnectorService { constructor() { } } diff --git a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.spec.ts b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.spec.ts deleted file mode 100644 index 72e6660b0..000000000 --- a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts.service.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { QbdDirectConnectorServiceTsService } from './qbd-direct-connector.service.ts.service'; - -describe('QbdDirectConnectorServiceTsService', () => { - let service: QbdDirectConnectorServiceTsService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(QbdDirectConnectorServiceTsService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.html b/src/app/shared/components/input/chechbox-button/chechbox-button.component.html deleted file mode 100644 index 293209ee9..000000000 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.html +++ /dev/null @@ -1 +0,0 @@ -

chechbox-button works!

diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts b/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts deleted file mode 100644 index 35f1ecd7d..000000000 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-chechbox-button', - standalone: true, - imports: [], - templateUrl: './chechbox-button.component.html', - styleUrl: './chechbox-button.component.scss' -}) -export class ChechboxButtonComponent { - -} diff --git a/src/app/shared/components/input/checkbox-button/checkbox-button.component.html b/src/app/shared/components/input/checkbox-button/checkbox-button.component.html new file mode 100644 index 000000000..db1a40a90 --- /dev/null +++ b/src/app/shared/components/input/checkbox-button/checkbox-button.component.html @@ -0,0 +1 @@ +

checkbox-button works!

diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.scss b/src/app/shared/components/input/checkbox-button/checkbox-button.component.scss similarity index 100% rename from src/app/shared/components/input/chechbox-button/chechbox-button.component.scss rename to src/app/shared/components/input/checkbox-button/checkbox-button.component.scss diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.spec.ts b/src/app/shared/components/input/checkbox-button/checkbox-button.component.spec.ts similarity index 51% rename from src/app/shared/components/input/chechbox-button/chechbox-button.component.spec.ts rename to src/app/shared/components/input/checkbox-button/checkbox-button.component.spec.ts index 854c2ddce..0fb4f1027 100644 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.spec.ts +++ b/src/app/shared/components/input/checkbox-button/checkbox-button.component.spec.ts @@ -1,18 +1,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ChechboxButtonComponent } from './chechbox-button.component'; +import { CheckboxButtonComponent } from './checkbox-button.component'; -describe('ChechboxButtonComponent', () => { - let component: ChechboxButtonComponent; - let fixture: ComponentFixture; +describe('CheckboxButtonComponent', () => { + let component: CheckboxButtonComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ChechboxButtonComponent] + imports: [CheckboxButtonComponent] }) .compileComponents(); - fixture = TestBed.createComponent(ChechboxButtonComponent); + fixture = TestBed.createComponent(CheckboxButtonComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/shared/components/input/checkbox-button/checkbox-button.component.ts b/src/app/shared/components/input/checkbox-button/checkbox-button.component.ts new file mode 100644 index 000000000..23feac110 --- /dev/null +++ b/src/app/shared/components/input/checkbox-button/checkbox-button.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-checkbox-button', + standalone: true, + imports: [], + templateUrl: './checkbox-button.component.html', + styleUrl: './checkbox-button.component.scss' +}) +export class CheckboxButtonComponent { + +} From ed655d98ae49ea663ca49c16b64ae13b1869e6f6 Mon Sep 17 00:00:00 2001 From: DhaaraniCIT Date: Tue, 5 Nov 2024 11:03:51 +0530 Subject: [PATCH 2/2] PR comments fix --- .../chechbox-button.component.html | 10 ------ .../chechbox-button.component.scss | 30 ----------------- .../chechbox-button.component.ts | 33 ------------------- src/app/shared/shared.module.ts | 6 ++-- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 src/app/shared/components/input/chechbox-button/chechbox-button.component.html delete mode 100644 src/app/shared/components/input/chechbox-button/chechbox-button.component.scss delete mode 100644 src/app/shared/components/input/chechbox-button/chechbox-button.component.ts diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.html b/src/app/shared/components/input/chechbox-button/chechbox-button.component.html deleted file mode 100644 index b642a2fd4..000000000 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
- - - - - -
\ No newline at end of file diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.scss b/src/app/shared/components/input/chechbox-button/chechbox-button.component.scss deleted file mode 100644 index d88cf9eef..000000000 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.scss +++ /dev/null @@ -1,30 +0,0 @@ -.checkedText { - @apply tw-w-[95px] #{!important}; -} - -.unCheckedText { - @apply tw-w-[148px] #{!important}; -} - -:host ::ng-deep .p-button { - @apply tw-h-40-px tw-text-text-secondary tw-bg-btn-outline-secondary-bg tw-rounded-sm tw-border tw-border-btn-outline-secondary-border-color #{!important}; -} - -:host ::ng-deep .p-button:enabled:hover { - @apply tw-text-text-secondary tw-bg-btn-outline-secondary-bg tw-border tw-border-btn-outline-secondary-border-color #{!important}; -} - -input[type="checkbox"] { - -webkit-appearance: none; /* Remove default styling */ - @apply tw-relative tw-w-16-px tw-h-16-px tw-appearance-none tw-bg-white tw-border tw-border-checkbox-icon-color tw-mr-14-px tw-rounded-md tw-cursor-pointer #{!important}; -} - -input[type="checkbox"]:checked { - @apply tw-bg-checkbox-icon-selected-color tw-border-checkbox-icon-selected-color #{!important}; -} - -input[type="checkbox"]:checked::after { - content: url('./../../../../../assets/icons/co/grv-checkmark-small.svg') !important; - @apply tw-absolute tw-top-[-3px] tw-left-[2px] #{!important}; -} - \ No newline at end of file diff --git a/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts b/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts deleted file mode 100644 index 67212b024..000000000 --- a/src/app/shared/components/input/chechbox-button/chechbox-button.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { ButtonModule } from 'primeng/button'; -import { brandingConfig } from 'src/app/branding/branding-config'; -import { checkBoxEmit } from 'src/app/core/models/common/helper.model'; - -@Component({ - selector: 'app-chechbox-button', - standalone: true, - imports: [ButtonModule, CommonModule], - templateUrl: './chechbox-button.component.html', - styleUrl: './chechbox-button.component.scss' -}) -export class ChechboxButtonComponent { - - @Input() unCheckedText: string; - - @Input() checkedText: string; - - @Input() id: number; - - @Output() checkBoxUpdated: EventEmitter = new EventEmitter(); - - isCheckboxSelected: boolean = false; - - brandingConfig = brandingConfig; - - onCheckBoxClick(event: any) { - const inputElement = event.target as HTMLInputElement; - this.isCheckboxSelected = inputElement.checked; - this.checkBoxUpdated.emit({id: this.id, value: this.isCheckboxSelected}); - } -} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 433c5cca6..cd9bb2919 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -92,7 +92,7 @@ import { SentenceCasePipe } from './pipes/sentence-case.pipe'; import { IconFieldModule } from 'primeng/iconfield'; import { InputIconModule } from 'primeng/inputicon'; import { BadgeComponent } from './components/core/badge/badge.component'; -import { ChechboxButtonComponent } from './components/input/chechbox-button/chechbox-button.component'; +import { CheckboxButtonComponent } from './components/input/checkbox-button/checkbox-button.component'; @NgModule({ @@ -193,7 +193,7 @@ import { ChechboxButtonComponent } from './components/input/chechbox-button/chec TabMenuModule, IconFieldModule, InputIconModule, - ChechboxButtonComponent, + CheckboxButtonComponent, IconSpriteModule.forRoot({ path: 'assets/sprites/sprite.svg' }) ], exports: [ @@ -269,7 +269,7 @@ import { ChechboxButtonComponent } from './components/input/chechbox-button/chec OptionalFieldComponent, SentenceCasePipe, BadgeComponent, - ChechboxButtonComponent + CheckboxButtonComponent ] }) export class SharedModule { }