Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom search button enhancement for SPV portal. #168

Open
wants to merge 64 commits into
base: cbrelease-4.8.20
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b169538
Merge pull request #151 from KB-iGOT/cbrelease-4.8.20
sureshece16 Jan 7, 2025
2f36300
new ui changes to add spec and map form in cios transforamtions
mansurskTarento Jan 7, 2025
a783801
Merge branch 'cbrelease-4.8.21' of https://github.com/KB-iGOT/sunbird…
mansurskTarento Jan 7, 2025
80e3f10
Merge pull request #153 from mansurskTarento/cios-via-api
sureshece16 Jan 7, 2025
ca4c72a
adding designations bulk upload and new ui changes in import designat…
mansurskTarento Jan 9, 2025
6d0c75a
cios via csv new ui changes
mansurskTarento Jan 9, 2025
c4ee0d7
Merge pull request #154 from mansurskTarento/designations-builk-upload
venkykandagaddala Jan 9, 2025
7eaeee4
Merge pull request #156 from mansurskTarento/cios-via-api
venkykandagaddala Jan 9, 2025
a36f80c
fixing: KB-8002 :- When SPV created new organisation and mdo admin of…
mansurskTarento Jan 16, 2025
8df9df4
Merge pull request #158 from mansurskTarento/designations-builk-upload
vishnubansaltarento Jan 16, 2025
1adae5c
fixing KB-8121:- Start Importing Button is moving outside the boundar…
mansurskTarento Jan 16, 2025
34f1d55
fixing: KB-8024 :- When SPV creates new organisation and added design…
mansurskTarento Jan 16, 2025
36f917b
Merge pull request #159 from mansurskTarento/designations-builk-upload
vishnubansaltarento Jan 16, 2025
0317c29
adding accordians ui in cios content upload
mansurskTarento Jan 17, 2025
7793eae
adding optionala check
mansurskTarento Jan 17, 2025
515c208
Merge pull request #160 from mansurskTarento/cios-via-api
vishnubansaltarento Jan 17, 2025
e63824b
KB-8139
venkykandagaddala Jan 17, 2025
55db521
Merge pull request #162 from venkykandagaddala/cbrelease-4.8.21
venkykandagaddala Jan 17, 2025
abb880d
fixing KB-8117: Allignement is not proper and Progress spelling is wrong
mansurskTarento Jan 17, 2025
ee59524
fixing KB-8088: If user wants to change the options in the drop down,…
mansurskTarento Jan 17, 2025
08b0779
fixing KB-8117: Progress spelling is wrong
mansurskTarento Jan 17, 2025
cac36b2
fixing KB-8132: f user enter the Space while entering the API its Acc…
mansurskTarento Jan 17, 2025
364b012
Merge branch 'cbrelease-4.8.21' of https://github.com/KB-iGOT/sunbird…
mansurskTarento Jan 17, 2025
cfa8cc0
Merge pull request #164 from mansurskTarento/cios-via-api
venkykandagaddala Jan 17, 2025
16d820e
fixing website url error message
mansurskTarento Jan 18, 2025
bab9123
Merge pull request #166 from mansurskTarento/cios-via-api
sureshece16 Jan 18, 2025
65cacc9
fixing KB-8039:- If user doesn’t enter the Transform content” and cli…
mansurskTarento Jan 20, 2025
191a650
fixing KB-8039:- If user doesn’t enter the Transform content” and cli…
mansurskTarento Jan 20, 2025
2d9775e
Merge pull request #167 from mansurskTarento/cios-via-api
vishnubansaltarento Jan 20, 2025
3b0b9e2
custom search button enhance
Afzal84 Jan 21, 2025
a0f7ac5
fixing tabs change issue in cios
mansurskTarento Jan 22, 2025
5de71cc
Merge pull request #169 from mansurskTarento/cios-via-api
vishnubansaltarento Jan 22, 2025
1cc410e
custom button Implementation
Afzal84 Jan 24, 2025
53e24be
search box css fix
nitinraj-tarento Jan 24, 2025
001049a
update jest config for angular 16
vishnubansaltarento Jan 30, 2025
ffc2f1f
update for jest config for angular 16
vishnubansaltarento Jan 30, 2025
ec4474c
Merge pull request #174 from KB-iGOT/jest-configuration-change-for-an…
vishnubansaltarento Jan 30, 2025
7796bcc
search button for SPV portal
Afzal84 Jan 31, 2025
163c280
Merge pull request #175 from KB-iGOT/cbrelease-4.8.20
vishnubansaltarento Feb 10, 2025
9999cf1
removing builk upload from designations
mansurskTarento Feb 10, 2025
93baecd
Merge pull request #176 from mansurskTarento/cbrelease-4.8.21
sureshece16 Feb 10, 2025
43a82d6
state admin rle added for create usr btn on directory
nitinraj-tarento Feb 12, 2025
2f30076
Merge pull request #177 from KB-iGOT/create-btn-fix-KAR-920
vishnubansaltarento Feb 12, 2025
52f9e0a
sonar cube issues fix
vishnubansaltarento Feb 14, 2025
8a9a5da
Merge pull request #178 from KB-iGOT/sonar-issue-fix
vishnubansaltarento Feb 14, 2025
8d95716
Merge branch 'cbrelease-4.8.21' of https://github.com/KB-iGOT/sunbird…
Afzal84 Feb 17, 2025
e59034a
searchbox ui fix
nitinraj-tarento Feb 18, 2025
f5de9f5
Merge branch 'spv-pagination-Issue' of https://github.com/KB-iGOT/sun…
Afzal84 Feb 18, 2025
99f256f
search box ui fix
nitinraj-tarento Feb 18, 2025
e88002b
Merge branch 'spv-pagination-Issue' of https://github.com/KB-iGOT/sun…
Afzal84 Feb 18, 2025
c905881
Custom button fix
Afzal84 Feb 18, 2025
38f2ab1
search box ui fix-2
nitinraj-tarento Feb 18, 2025
e031d94
Merge branch 'spv-pagination-Issue' of https://github.com/KB-iGOT/sun…
nitinraj-tarento Feb 18, 2025
68171c3
search box ui fix-2
nitinraj-tarento Feb 18, 2025
1e76823
survey search button CSS fix
Afzal84 Feb 18, 2025
a3c9d84
version update for library
Afzal84 Feb 19, 2025
f4a0bd7
Optional check missing
Afzal84 Feb 20, 2025
1b58b29
condition corrected
Afzal84 Feb 20, 2025
c02199b
search input border radius fixed
nitinraj-tarento Feb 20, 2025
3d79dfc
Optional check missing
Afzal84 Feb 20, 2025
3ceabb3
button colour and border fix
nitinraj-tarento Feb 20, 2025
3a2c93f
Merge branch 'spv-pagination-Issue' of https://github.com/KB-iGOT/sun…
nitinraj-tarento Feb 20, 2025
e50f920
download btn color fix on survey report page
nitinraj-tarento Feb 20, 2025
fc124ab
survey input box css fix
Afzal84 Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = {
preset: 'ts-jest',
preset: 'jest-preset-angular',
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
transformIgnorePatterns: [
'node_modules/(?!.*\\.mjs$)',
],
moduleNameMapper: {
'worker-loader!.*': '<rootDir>/test/mocks/workerMock.js',
'pdfjs-dist/build/pdf.worker': '<rootDir>/test/mocks/workerMock.js',
"^src/environments/environment$": "<rootDir>/src/environments/environment.ts",
},
// moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
// transformIgnorePatterns: ['/node_modules/'],
// moduleNameMapper: {
// '^src/(.*)$': '/home/sujithsojan/Desktop/igot-jest/sunbird-cb-adminportal/src/$1',
// },
// setupFiles: ['/home/sujithsojan/Desktop/igot-jest/sunbird-cb-adminportal/src/jest.setup.ts'],
coverageDirectory: './coverage',
coverageReporters: ["clover", "json", "lcov", "text", "text-summary"],
collectCoverage: true,
testResultsProcessor: "jest-sonar-reporter"
}
testResultsProcessor: "jest-sonar-reporter",
setupFiles: ['zone.js', ]
};
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"start:spv-dev": "node --max_old_space_size=12288 ./node_modules/@angular/cli/bin/ng serve --proxy-config proxy/spv-dev-ip.proxy.json -o",
"analyse": "webpack-bundle-analyzer ./dist/www/ng serve --proxy-config proxy/localhost.proxy.json -o/stats-es5.json",
"test": "jest",
"test-coverage": "./node_modules/jest/bin/jest.js --clearCache && node --max_old_space_size=1024 ./node_modules/jest/bin/jest.js --silent --ci --collectCoverage=true --coverageReporters=lcov --detectOpenHandles --forceExit=true",
"test-coverage": "./node_modules/jest/bin/jest.js --clearCache && node --max_old_space_size=8000 ./node_modules/jest/bin/jest.js --silent --ci --collectCoverage=true --coverageReporters=lcov --detectOpenHandles --forceExit=true",
"lint": "ng lint",
"lint:fix": "ng lint --fix",
"e2e": "ng e2e",
Expand All @@ -27,6 +27,7 @@
},
"private": true,
"dependencies": {
"@angular-builders/jest": "^19.0.0",
"@angular/animations": "^16.2.12",
"@angular/cdk": "^16.2.14",
"@angular/common": "^16.2.12",
Expand All @@ -43,7 +44,7 @@
"@babel/core": "7.22.0",
"@babel/preset-env": "7.25.4",
"@project-sunbird/telemetry-sdk": "0.0.26",
"@sunbird-cb/collection": "1.0.49-ang-13-16",
"@sunbird-cb/collection": "1.0.53-ang-13-16",
"@sunbird-cb/rain-dashboards": "0.0.36-ang-13-16",
"@sunbird-cb/resolver": "1.0.0-ang-13-16",
"@sunbird-cb/taxonomy-editor": "0.0.0-ang-13-16",
Expand All @@ -61,7 +62,7 @@
"file-saver": "^2.0.2",
"hammerjs": "^2.0.8",
"husky": "^4.2.3",
"jest": "29.7.0",
"jest": "^29.7.0",
"jest-preset-angular": "^14.2.4",
"jquery": "^3.4.1",
"jsoneditor": "^10.1.0",
Expand Down Expand Up @@ -117,6 +118,7 @@
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"jest-sonar-reporter": "^2.0.0",
"jest-localstorage-mock": "^2.4.26",
"karma": "~6.4.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
uploadedLogoResponse!: IUploadedLogoresponse
organizationNameList: string[] = []
ORG_NAME_PATTERN = /^[a-zA-Z0-9 ().,@\-\$\/\\:\[\]!\s]*$/
rootOrgId: any

untilDestroyed$ = new Subject<void>();
isMatcompleteOpened = false
Expand All @@ -57,7 +56,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
private snackBar: MatSnackBar,
private createMDOService: CreateMDOService,
private activatedRoute: ActivatedRoute,
private loaderService: LoaderService,
private loaderService: LoaderService
) {

this.addOverflowHidden()
Expand Down Expand Up @@ -218,8 +217,6 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
}

onSubmitCreateOrganization() {
const userProfile = _.get(this.activatedRoute, 'snapshot.parent.data.configService.userProfile')
this.rootOrgId = userProfile.rootOrgId
let payload: any = {
orgName: this.controls['organisationName']?.value || "",
channel: this.controls['organisationName']?.value || "",
Expand All @@ -230,10 +227,8 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
logo: this.uploadedLogoResponse?.qrcodepath || "",
description: this.controls['description']?.value || "",
parentMapId: "",
sbRootOrgId: this.rootOrgId

}
// if (this.heirarchyObject && this.heirarchyObject.sbRootOrgId) {
// if (this.heirarchyObject.sbRootOrgId) {
// payload['sbRootOrgId'] = this.heirarchyObject.sbRootOrgId
// }
if (this.controls['category']?.value === 'state') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@
</div>
<div class="example-table-container">

<div class="search items-center">
<div class=rsearch>
<div class="search">
<div class="rsearch flex-row">
<div class="sinput mat-field-rounded">
<span class="material-icons"> search </span>
<input type="Standard" id="search" label="" #searchInput (input)="applyFilter($event.target.value)"
(keydown.enter)="onSearchEnter($event.target.value)" placeholder="Search">
[(ngModel)]="searchValue" (keydown.enter)="onSearchEnter($event.target.value)"
placeholder="Search">
</div>
<div class="margin-left-xs">
<button mat-raised-button type="button" (click)="onSearchEnter(searchValue)"
[ngClass]="{ 'disabled-cls': !moreThanTwoChar }"
class="text-white ws-mat-primary-background text-white cstm-height-width mat-btn-flat">
<span class="text-white">Search</span>
</button>
</div>
</div>

<button mat-flat-button *ngIf="needCreate" class="mat-btn-flat margin-right-m" (click)="gotoCreateNew()">
<b class="text-white">Create new</b>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ $title-line-count: 2;
.search {
display: flex;
flex: 1;
margin-bottom:16px;
}

.lsearch {
Expand All @@ -648,28 +649,30 @@ $title-line-count: 2;
}

.noContent {
/* stylelint-disable */
font: 700 14px 'Lato';
/* stylelint-enable */
color: #000000de;
}

.sinput {
width: 50%;
border-radius: 9999px;
width: 400px;
border-radius: 20px;
border: 1px solid #d5d0d0;
padding: 12px 16px;
margin-bottom: 10px;
margin-top: 10px;
min-height: 20px;
padding: 8px 16px;
box-sizing: border-box;
// margin-bottom: 10px;
height: 42px;

.material-icons {
vertical-align: bottom;
vertical-align: middle;
font-size: 20px;
margin-right: 7px;
margin-right: 4px;
}

input {
border: 0 !important;
width: 75%;
// width: 75%;
outline: none !important;
}
}
Expand Down Expand Up @@ -734,4 +737,13 @@ $title-line-count: 2;
::ng-deep .mat-column-mdo {
width: 450px;
flex: none;
}
.disabled-cls {
opacity: 0.6;
pointer-events: none;
cursor: not-allowed;
}

.search-btn-div {
margin-top: 6px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang
showNewNoContent = false
openCreateNavBar = false
openMode = ''
searchValue: string = ''
moreThanTwoChar = false
rowData: any
dropdownList: {
statesList: any[],
Expand Down Expand Up @@ -120,8 +122,20 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang
}
ngAfterViewInit() { }

// applyFilter(filterValue: any) {
// this.filterSubject.next(filterValue)
// }
applyFilter(filterValue: any) {
this.filterSubject.next(filterValue)

if (filterValue?.length === 0) {
this.onSearchEnter('')
this.filterSubject.next('')
}
if (filterValue?.length > 2) {
this.moreThanTwoChar = true
} else {
this.moreThanTwoChar = false
}
}

onOrgPageChange(event: any) {
Expand Down Expand Up @@ -235,7 +249,11 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang
}

onSearchEnter(filterValue: any) {
this.searchByEnterKey.emit(filterValue)
if (filterValue === '') {
this.searchByEnterKey.emit('')
} else if (filterValue?.length > 2) {
this.searchByEnterKey.emit(filterValue)
}
}

buttonClickAction(event: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,53 @@
<div class="example-table-container">
<div class=rsearch>
<div class="w-100">
<div class="sinput">
<span class="material-icons"> search </span>
<input type="Standard" label="" (input)="applyFilter($event.target.value)"
(keydown.enter)="onSearchEnter($event)" placeholder="Search">
<div class="flex flex-row">
<div class="sinput">
<span class="material-icons"> search </span>
<input type="Standard" label="" (input)="applyFilter($event.target.value)" placeholder="Search"
[(ngModel)]="searchValue" (keydown.enter)="onSearchEnter($event.target.value)">
</div>
<div *ngIf="isSurveySearch">
<button mat-raised-button type="button" (click)="onSearchEnter(searchValue)"
[ngClass]="{ 'disabled-cls': !moreThanTwoChar }"
class="text-white ws-mat-primary-background text-white margin-left-s cstm-height-width mat-btn-flat">
<span class="text-white">Search</span>
</button>
</div>
</div>
</div>

<div>
<button mat-raised-button type="button" *ngIf="isReports" class="download-btn margin-right-m"
(click)="downloadUsersReport(departmentName)">
<button mat-raised-button type="button" *ngIf="isReports"
class="download-btn margin-right-m mat-btn-flat" (click)="downloadUsersReport(departmentName)">
<mat-icon>vertical_align_bottom</mat-icon> Users Report
</button>
</div>

<div>
<button mat-raised-button type="button" *ngIf="isReports" class="download-btn margin-right-m"
<button mat-raised-button type="button" *ngIf="isReports"
class="download-btn margin-right-m mat-btn-flat"
(click)="downloadConsumptionReport(departmentName)">
<mat-icon>vertical_align_bottom</mat-icon> Consumption Report
</button>
</div>
<div *ngIf="!isReports">
<button mat-raised-button type="button" *ngIf="needCreateUser"
class="text-white ws-mat-primary-background text-white margin-right-l custom-btn"
class="text-white ws-mat-primary-background text-white margin-right-l custom-btn mat-btn-flat"
(click)="gotoCreateUser()">
<b class="text-white">Create user</b>
</button>
</div>
<div style="margin-right: 7px;" *ngIf="!isReports">
<button mat-raised-button type="button" *ngIf="needCreatePosition"
class="text-white ws-mat-primary-background text-white margin-right-l"
class="text-white ws-mat-primary-background text-white margin-right-l mat-btn-flat"
(click)="gotoCreatePosition()">
<b class="text-white">Add new designation</b>
</button>
</div>
<div *ngIf="!isReports">
<button mat-raised-button type="button" *ngIf="needAddAdmin"
class="text-white ws-mat-primary-background text-white margin-right-m custom-btn"
class="text-white ws-mat-primary-background text-white margin-right-m custom-btn mat-btn-flat"
(click)="openPopup()">
<b class="text-white">Add admin</b>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,20 @@ $title-line-count: 2;
.rsearch {
display: flex;
flex: 1 1 auto;
margin-bottom: 12px;

}
.w-100{
width: 100%;
}
.sinput {
width: 300px;
border-radius: 4px;
width: 400px;
border-radius: 20px;
border: 1px solid #d5d0d0;
padding: 4px 8px 8px;
margin-bottom: 20px;
min-height: 20px;
padding: 8px 16px;
box-sizing: border-box;
// margin-bottom: 10px;
height: 42px;

.material-icons {
vertical-align: bottom;
Expand All @@ -657,7 +659,6 @@ $title-line-count: 2;

input {
border: 0 !important;
width: 84%;
outline: none !important;
}
}
Expand Down Expand Up @@ -702,4 +703,12 @@ $title-line-count: 2;
font-family: "Lato-Regular", sans-serif;
font-weight: 700;
font-size: 14px;
}
.cstm-height-width {
height: 38px;
}
.disabled-cls {
opacity: 0.6;
pointer-events: none;
cursor: not-allowed;
}
Loading