-
Notifications
You must be signed in to change notification settings - Fork 36
Onboarding Project #46
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
base: master
Are you sure you want to change the base?
Changes from 41 commits
9de206d
feddf76
20ab5f0
161dba8
4db8da4
4379d03
1574a99
d7cc5a7
68d6fdc
5590608
92c2304
0449b6f
18305ee
07b2e55
46fa399
120a175
0250464
e79a514
8df21a6
b2c0a70
b16c29c
75c52e0
5c1408b
ee7b2ca
07261b4
5a64f0b
b92adc3
e06829b
b49d5a8
28f1ff8
2a2a633
f70d831
1a2ee0d
784d208
7b77515
d7367c0
d15a355
0b1bb06
6318826
6b095c5
3af4520
9722222
5a6339b
c81a308
60d758a
79b2f6a
2d11963
3f81c01
7a1f771
20a4790
105295d
42bca52
57f6a66
f0e6652
e31e167
432722c
24af382
9311f71
73c6b0b
a0b243f
2d5786b
c73e797
6b5b5b4
9214692
7c5ee28
603fc3d
04cb27a
a43ea08
7bf7ba5
c5174fc
4eb4f82
5528fd6
7c7ea1a
1df95c0
9518331
8093c8a
dc20c08
6fd8954
5ffd990
8e9d50a
f2b7bf3
138f01c
e94ac2e
cd397ac
e2d638d
27e027a
126a1f0
03274eb
194d261
4d61536
350c90b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| /node_modules | ||
| app.js | ||
| app.js.map | ||
| ApiData.js | ||
| ApiData.js.map | ||
| GridTemp.js | ||
| GridTemp.js.map |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,222 @@ | ||||||||||||||||
| // Interface to define the structure of grid data | ||||||||||||||||
| interface ColumnName { | ||||||||||||||||
| name: string; | ||||||||||||||||
| } | ||||||||||||||||
| // Interface to define column names | ||||||||||||||||
| interface GridData { | ||||||||||||||||
| [key: string]: any; | ||||||||||||||||
| } | ||||||||||||||||
| class ApiData { | ||||||||||||||||
| // Properties to manage data and settings | ||||||||||||||||
| pageSize: number; | ||||||||||||||||
| currentPage: number = 1; | ||||||||||||||||
| data: GridData[] = []; | ||||||||||||||||
| totalItems: number = 0; | ||||||||||||||||
| columnNames: ColumnName[] = []; | ||||||||||||||||
| maxGridHeight: number = 0; | ||||||||||||||||
| firstVal: number = 0; | ||||||||||||||||
| lastVal: number = -1; | ||||||||||||||||
|
|
||||||||||||||||
| constructor(pageSize: number) { | ||||||||||||||||
| this.pageSize = pageSize; | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /** Initialize method to set up the grid */ | ||||||||||||||||
| async initialize(): Promise<void> { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for |
||||||||||||||||
| Promise.resolve() | ||||||||||||||||
| .then(() => this.adjustGridHeight()) | ||||||||||||||||
| .then(() => this.recordCount()) | ||||||||||||||||
| .then(() => this.fetchColumns()) | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't create a
Suggested change
|
||||||||||||||||
| .then(() => this.fetchRecords()) | ||||||||||||||||
| .then(() => this.setupControls()) | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Missing semi-colon
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /**Method to fetch total record count from the server */ | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed a space, and no need to say that a method is a method
Suggested change
|
||||||||||||||||
| async recordCount(): Promise<void> { | ||||||||||||||||
| return this.fetchData('http://localhost:2050/recordCount') | ||||||||||||||||
| .then((response: any) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You specified the return type for |
||||||||||||||||
| const totalItems = response; | ||||||||||||||||
| this.totalItems = totalItems; | ||||||||||||||||
| }) | ||||||||||||||||
| .catch(() => { | ||||||||||||||||
| throw ('Failed to fetch record count.'); | ||||||||||||||||
| }); | ||||||||||||||||
|
Comment on lines
+56
to
+59
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, by catching the error here, and more specifically, not throwing an error here, the calling function has no idea something went wrong, and will try and continue executing the rest of your code. This is usually a good thing, as we don't want a front-end app to break just because one part of it is broken. But when I look at |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /**fectch column names*/ | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave a space after the |
||||||||||||||||
| async fetchColumns(): Promise<void> { | ||||||||||||||||
| return this.fetchData('http://localhost:2050/columns') | ||||||||||||||||
| .then((response: any) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You specified the return type for |
||||||||||||||||
| const res = JSON.parse(response); | ||||||||||||||||
| this.columnNames = res.map((columnName: any) => ({ name: columnName })); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure you know what the type of |
||||||||||||||||
| this.data = new Array<GridData>(this.columnNames.length); | ||||||||||||||||
| }) | ||||||||||||||||
| .catch(() => { | ||||||||||||||||
| throw ('Failed to fetch columns.'); | ||||||||||||||||
| }); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /**get records from API for fetch an search functionality*/ | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave a space after the |
||||||||||||||||
| async fetchAndProcessRecords(from: number, to: number): Promise<GridData[]> { | ||||||||||||||||
| $('#spinner').show(); | ||||||||||||||||
| $('#grid').hide(); | ||||||||||||||||
|
|
||||||||||||||||
| return this.fetchData(`http://localhost:2050/records?from=${from}&to=${to}`) | ||||||||||||||||
| .then((response: any) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You specified the return type for |
||||||||||||||||
| const res = JSON.parse(response); | ||||||||||||||||
| const processedData = res.map((record: any) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure you know what the type of |
||||||||||||||||
| const obj: GridData = {}; | ||||||||||||||||
| for (let j = 0; j < this.columnNames.length && j < record.length; j++) { | ||||||||||||||||
| obj[this.columnNames[j].name] = record[j]; | ||||||||||||||||
| } | ||||||||||||||||
| return obj; | ||||||||||||||||
| }); | ||||||||||||||||
| $('#spinner').hide(); | ||||||||||||||||
| $('#grid').show(); | ||||||||||||||||
| return processedData; | ||||||||||||||||
| }) | ||||||||||||||||
| .catch(() => { | ||||||||||||||||
| throw ('Failed to fetch records'); | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I mean, wouldn't you like to know the error? We know if failed but why? |
||||||||||||||||
| }); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /**fetch records from api*/ | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave a space after the |
||||||||||||||||
| async fetchRecords(): Promise<void> { | ||||||||||||||||
| const maxRange = this.totalItems - 1; | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||
| const from = this.firstVal; | ||||||||||||||||
| let to = Math.min(from + this.pageSize, maxRange); | ||||||||||||||||
|
|
||||||||||||||||
| if (to >= maxRange) { | ||||||||||||||||
| // Set currentPage to the last page | ||||||||||||||||
| this.currentPage = Math.floor(maxRange / this.pageSize) + 1; | ||||||||||||||||
| to = maxRange; | ||||||||||||||||
| } | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should you not also update the value of |
||||||||||||||||
|
|
||||||||||||||||
| return this.fetchAndProcessRecords(from, to) | ||||||||||||||||
| .then((processedData) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either remove the |
||||||||||||||||
| this.data = processedData; | ||||||||||||||||
| this.displayRecords(); | ||||||||||||||||
| this.updatePageInfo(); | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So Sounds like double work to me 🥵 |
||||||||||||||||
| }) | ||||||||||||||||
| .catch(() => { | ||||||||||||||||
| throw ('Failed to fetch records'); | ||||||||||||||||
| }); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| /**funtion to search through records using fromID*/ | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave a space after the |
||||||||||||||||
| async searchRecords(searchValue: number): Promise<void> { | ||||||||||||||||
| // Maximum allowed Value | ||||||||||||||||
| const maxRange = this.totalItems - 1; | ||||||||||||||||
|
|
||||||||||||||||
| if (searchValue >= 0 && searchValue <= maxRange) { | ||||||||||||||||
| const from = searchValue; | ||||||||||||||||
| const to = Math.min(from + this.pageSize, maxRange); | ||||||||||||||||
|
|
||||||||||||||||
| return this.fetchAndProcessRecords(from, to) | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please adjust your |
||||||||||||||||
| .then((processedData) => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either remove the |
||||||||||||||||
| this.data = processedData; | ||||||||||||||||
| this.currentPage = Math.ceil(from / this.pageSize) + 1; | ||||||||||||||||
| // Set firstVal to searched value | ||||||||||||||||
| this.firstVal = from; | ||||||||||||||||
| // Calculate lastVal based on pageSize | ||||||||||||||||
| this.lastVal = from + this.pageSize; | ||||||||||||||||
| this.displayRecords(); | ||||||||||||||||
| this.updatePageInfo(); | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same vibe as previously mentioned |
||||||||||||||||
| }) | ||||||||||||||||
| .catch(() => { | ||||||||||||||||
| throw ('Failed to search value'); | ||||||||||||||||
| }); | ||||||||||||||||
| } else { | ||||||||||||||||
| alert('Please enter values in the range (0-999999)'); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not all back-ends will have the same max id. You will have to change this to not be hard coded. |
||||||||||||||||
| return Promise.resolve(); | ||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| //change grid height according to screen size | ||||||||||||||||
| private adjustGridHeight(): void { | ||||||||||||||||
| const gridElement = document.getElementById('grid'); | ||||||||||||||||
| const pageCntrl = $('.grid-controls').innerHeight(); | ||||||||||||||||
| const screenHeight = $(window).innerHeight(); | ||||||||||||||||
| if (gridElement && pageCntrl !== undefined && screenHeight !== undefined) { | ||||||||||||||||
| this.maxGridHeight = screenHeight - pageCntrl; | ||||||||||||||||
| gridElement.style.height = `${this.maxGridHeight}px`; | ||||||||||||||||
| }; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this one |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| // Update the page information and records display based on the current state of the grid. | ||||||||||||||||
| private updatePageInfo(): void { | ||||||||||||||||
| const totalPages = Math.ceil(this.totalItems / this.pageSize); | ||||||||||||||||
| const pageInfo = `Page ${this.currentPage} of ${totalPages}`; | ||||||||||||||||
| const maxRange = this.totalItems - 1; | ||||||||||||||||
| const from = this.firstVal; | ||||||||||||||||
| let to = Math.min(from + this.pageSize, maxRange); | ||||||||||||||||
| $('#pageInfo').text(`${pageInfo}`); | ||||||||||||||||
| $('.records').text(`Showing records ${from} to ${to}`); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| // use Ajax for data fetching | ||||||||||||||||
| private async fetchData(url: string): Promise<number | string> { | ||||||||||||||||
| try { | ||||||||||||||||
| $('#overlay').show(); | ||||||||||||||||
| const response = await $.ajax({ | ||||||||||||||||
| url, | ||||||||||||||||
| method: 'GET', | ||||||||||||||||
| }); | ||||||||||||||||
| $('#overlay').hide(); | ||||||||||||||||
| return response; | ||||||||||||||||
| } catch (error) { | ||||||||||||||||
| throw error; | ||||||||||||||||
| }; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this one |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| private setupControls(): void { | ||||||||||||||||
| $('#prevBtn').on('click', () => this.handlePageChange(-1)); | ||||||||||||||||
| $('#nextBtn').on('click', () => this.handlePageChange(1)); | ||||||||||||||||
| $(window).on('resize', debounce(this.handleResize, 100)); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| private handlePageChange(delta: number): void { | ||||||||||||||||
|
CelesteNaude marked this conversation as resolved.
|
||||||||||||||||
|
|
||||||||||||||||
| if (delta > 0 && this.firstVal + delta * this.pageSize > this.totalItems - 1) { | ||||||||||||||||
| this.firstVal = 0; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help me if I am wrong here... but
This does not sound correct. Should you not be setting it to max - the amount of records you need to show? |
||||||||||||||||
| } else if (delta < 0 && this.firstVal + delta * this.pageSize < 0) { | ||||||||||||||||
| this.firstVal = Math.max(0, this.totalItems - this.pageSize); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help me if I am wrong here... but
This does not sound correct. Should you not be setting it to zero? |
||||||||||||||||
| } else { | ||||||||||||||||
| this.firstVal = Math.max(0, Math.min(this.firstVal + delta * this.pageSize, this.totalItems - 1)); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, very clean way of ensuring you have a valid value :) |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| this.lastVal = this.firstVal + this.pageSize - 1; | ||||||||||||||||
| this.currentPage = Math.floor(this.firstVal / this.pageSize) + 1; | ||||||||||||||||
| this.fetchRecords(); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to implement error handling here if I have implemented it within the fetchRecords function? |
||||||||||||||||
| this.updatePageInfo(); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better if you only did |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| private handleResize = (): void => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't make variables on a class that are just functions if you have no intention of changing the value, or allowing someone else to change the value. |
||||||||||||||||
| const newGridSize = Math.floor((Math.floor($(window).innerHeight() as number) * GRID_RATIO) / ROW_HEIGHT) - 1; | ||||||||||||||||
|
|
||||||||||||||||
| // Check if the new grid size is non-negative | ||||||||||||||||
| if (newGridSize >= 0) { | ||||||||||||||||
| // Adjust firstVal for the last page | ||||||||||||||||
| if (this.firstVal + newGridSize > this.totalItems) { | ||||||||||||||||
| this.firstVal = Math.max(this.totalItems - newGridSize); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you need the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you not also need |
||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| this.pageSize = newGridSize; | ||||||||||||||||
| this.lastVal = this.firstVal + newGridSize - 1; | ||||||||||||||||
|
|
||||||||||||||||
| // Fetch records, update page info, and adjust grid height | ||||||||||||||||
| this.fetchRecords(); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||
| this.updatePageInfo(); | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better if you only did |
||||||||||||||||
| this.adjustGridHeight(); | ||||||||||||||||
|
FritzOnFire marked this conversation as resolved.
|
||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| private displayRecords = (): void => { | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't make variables on a class that are just functions if you have no intention of changing the value, or allowing someone else to change the value. |
||||||||||||||||
| const gridTemplate = new GridTemplate(this.columnNames, this.data); | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we are creating the GridTemplate class everytime we displayRecords()? I would have loved that we could just set the dataRecords every time we update the display because |
||||||||||||||||
| gridTemplate.displayRecords(); | ||||||||||||||||
| this.updatePageInfo(); | ||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Class to manage the grid template and display records | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please change this function to the javadoc format |
||
| class GridTemplate { | ||
| private columnNames: ColumnName[] = []; | ||
| private dataRecords: GridData[] = []; | ||
| // Initializes the column names and data records that will be used to display records in the grid. | ||
| constructor(columnNames: ColumnName[], dataRecords: GridData[]) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add an empty line between your constructor and your variables. |
||
| this.columnNames = columnNames; | ||
| this.dataRecords = dataRecords; | ||
| } | ||
| // Display records in a grid in table format | ||
| displayRecords(): void { | ||
|
|
||
| const gridElement = document.getElementById('grid'); | ||
| if (gridElement) { | ||
| gridElement.innerHTML = ''; | ||
| const table = document.createElement('table'); | ||
| const thead = document.createElement('thead'); | ||
| const headerRow = document.createElement('tr'); | ||
| for (const column of this.columnNames) { | ||
| const th = document.createElement('th'); | ||
| th.textContent = column.name; | ||
| headerRow.appendChild(th); | ||
| } | ||
| thead.appendChild(headerRow); | ||
| table.appendChild(thead); | ||
| // Create table body | ||
| const tbody = document.createElement('tbody'); | ||
| for (const row of this.dataRecords) { | ||
| const tr = document.createElement('tr'); | ||
| for (const column of this.columnNames) { | ||
| const td = document.createElement('td'); | ||
| td.textContent = row[column.name]; | ||
| tr.appendChild(td); | ||
| } | ||
| tbody.appendChild(tr); | ||
| } | ||
| table.appendChild(tbody); | ||
| // Append the table to the grid element | ||
| gridElement.appendChild(table); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| body, | ||
| html { | ||
| margin: 0; | ||
| padding: 0; | ||
| height: 100%; | ||
| overflow: hidden; | ||
| font-family: system-ui; | ||
| } | ||
|
|
||
| #overlay { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| background-color: rgba(231, 238, 238, 0.815); | ||
| z-index: 900; | ||
| display: none; | ||
| } | ||
|
|
||
| .spinner-container { | ||
| text-align: center; | ||
| } | ||
|
|
||
| #grid { | ||
| border: 1px solid #333333; | ||
| text-align: center; | ||
| background-color: #f2f6f7; | ||
| } | ||
|
|
||
| /* table */ | ||
| table { | ||
| height: 100%; | ||
| border-collapse: collapse; | ||
| } | ||
|
|
||
| tr { | ||
| border: 1px solid #333333; | ||
| } | ||
|
|
||
| thead { | ||
| background-color: #333333; | ||
| font-weight: 450; | ||
| color: white; | ||
| } | ||
|
|
||
| td { | ||
| padding: 2px; | ||
| border: 1px solid #333333; | ||
| align-content: center; | ||
| width: 350px; | ||
| } | ||
|
|
||
| .grid-controls { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 10px; | ||
| color: white; | ||
| background-color: #333333; | ||
| position: sticky; | ||
| bottom: 0; | ||
| } | ||
|
|
||
| #pageInfo, | ||
| .records { | ||
| font-weight: 450; | ||
| background-color: #333333; | ||
| } | ||
|
|
||
| #fromInput { | ||
| padding: 5px 10px; | ||
| margin: 0 5px; | ||
| background-color: #232425; | ||
| color: white; | ||
| } | ||
|
|
||
| /* button */ | ||
| .btn { | ||
| cursor: pointer; | ||
| padding: 5px 10px; | ||
| margin: 0 5px; | ||
| color: white; | ||
| background-color: #5a5f61; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.