Skip to content

Commit

Permalink
feat(ME): Add styling for the table and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Oct 26, 2023
1 parent 6b373dc commit c474e59
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
6 changes: 4 additions & 2 deletions libs/ui/inputs/src/lib/checkbox/checkbox.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ describe('CheckboxComponent', () => {
component.checked = false
})
it('should invert checked state when being clicked', () => {
component.handleClick()
const event = new Event('click')
component.handleClick(event)

expect(component.checked).toBe(true)
})
Expand All @@ -37,7 +38,8 @@ describe('CheckboxComponent', () => {
component.checked = true
})
it('should invert checked state when being clicked', () => {
component.handleClick()
const event = new Event('click')
component.handleClick(event)

expect(component.checked).toBe(false)
})
Expand Down
25 changes: 13 additions & 12 deletions libs/ui/search/src/lib/record-table/record-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
class="grid grid-cols-[repeat(6,minmax(0,max-content))] gap-x-4 gap-y-1"
>
<div class="contents text-sm">
<div class="record-table-header contents flex justify-center">
<div class="flex justify-center">
<gn-ui-checkbox
[checked]="isAllSelected()"
[indeterminate]="isSomeSelected()"
(changed)="selectAll()"
>
</gn-ui-checkbox>
</div>
<div class="flex justify-center items-center">
<gn-ui-checkbox
[checked]="isAllSelected()"
[indeterminate]="isSomeSelected()"
(changed)="selectAll()"
>
</gn-ui-checkbox>
</div>
<div class="record-table-header text-gray-400 flex gap-1">
<gn-ui-button
Expand Down Expand Up @@ -124,7 +122,10 @@
(changed)="handleRecordSelectedChange($event, record)"
></gn-ui-checkbox>
</div>
<div [title]="record.title" class="record-table-col text-16">
<div
[title]="record.title"
class="record-table-col text-16 self-center"
>
{{ record.title }}
</div>
<div
Expand Down Expand Up @@ -157,10 +158,10 @@
<mat-icon class="material-symbols-outlined"> person </mat-icon>
<span class="">{{ formatUserInfo(record.extras?.ownerInfo) }}</span>
</div>
<div class="record-table-col text-16">
<div class="record-table-col text-16 self-center">
{{ dateToString(record.recordUpdated) }}
</div>
<div class="record-table-col text-16">
<div class="record-table-col text-16 self-center">
{{ dateToString(record.recordCreated) }}
</div>
</div>
Expand Down

0 comments on commit c474e59

Please sign in to comment.