-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
243 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
<h1 class="text-navy text-3xl font-bold underline">Hello world!</h1> | ||
|
||
<app-header /> | ||
<router-outlet /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { RouterOutlet } from '@angular/router'; | ||
import { HeaderComponent } from './components/header/header.component'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
standalone: true, | ||
imports: [RouterOutlet], | ||
imports: [RouterOutlet, HeaderComponent], | ||
templateUrl: './app.component.html', | ||
styleUrl: './app.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class AppComponent { | ||
title = 'component-library-demo'; | ||
title = '121 Portal | Component Library Demo'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<p-toolbar styleClass="bg-navy border-none rounded-none"> | ||
<ng-template pTemplate="start"> | ||
<p-button | ||
icon="pi pi-bars" | ||
rounded | ||
severity="contrast" | ||
class="mr-2 text-white" | ||
(click)="sidebarVisible = true" | ||
/> | ||
<h1 class="text-white">121 Portal</h1> | ||
</ng-template> | ||
<ng-template pTemplate="end"> | ||
<div class="align-items-center flex gap-2"> | ||
<p-button | ||
icon="pi pi-search" | ||
rounded | ||
severity="contrast" | ||
class="mr-1 text-white" | ||
/> | ||
<p-button | ||
icon="pi pi-bell" | ||
rounded | ||
severity="contrast" | ||
class="mr-1 text-white" | ||
/> | ||
<p-button | ||
icon="pi pi-user" | ||
rounded | ||
severity="contrast" | ||
class="text-white" | ||
/> | ||
</div> | ||
</ng-template> | ||
</p-toolbar> | ||
<p-sidebar [(visible)]="sidebarVisible"> | ||
<h3>Sidebar</h3> | ||
<p>Lorem ipsum dolor sit amet...</p> | ||
</p-sidebar> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { HeaderComponent } from './header.component'; | ||
import { provideExperimentalZonelessChangeDetection } from '@angular/core'; | ||
|
||
describe('HeaderComponent', () => { | ||
let component: HeaderComponent; | ||
let fixture: ComponentFixture<HeaderComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [HeaderComponent], | ||
providers: [provideExperimentalZonelessChangeDetection()], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(HeaderComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { ButtonModule } from 'primeng/button'; | ||
import { ToolbarModule } from 'primeng/toolbar'; | ||
import { SidebarModule } from 'primeng/sidebar'; | ||
|
||
@Component({ | ||
selector: 'app-header', | ||
standalone: true, | ||
imports: [ButtonModule, ToolbarModule, SidebarModule], | ||
templateUrl: './header.component.html', | ||
styleUrl: './header.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class HeaderComponent { | ||
sidebarVisible = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
<p>homepage works!</p> | ||
<div class="w-full bg-white"> | ||
<div class="container mx-auto pt-2"> | ||
<p-tabMenu [model]="navMenuItems" /> | ||
</div> | ||
</div> | ||
<div class="w-full"> | ||
<div class="container mx-auto py-4"> | ||
<div class="flex items-stretch"> | ||
<p-selectButton | ||
[options]="paymentStatuses" | ||
[(ngModel)]="selectedPaymentStatus" | ||
optionLabel="label" | ||
optionValue="value" | ||
/> | ||
|
||
<div class="ml-auto flex gap-2"> | ||
<p-splitButton | ||
label="Download" | ||
[model]="downloadOptions" | ||
rounded | ||
[buttonDisabled]="true" | ||
severity="secondary" | ||
/> | ||
<p-button rounded severity="primary" label="Create new payment" /> | ||
<p-splitButton [model]="downloadOptions" rounded severity="secondary" /> | ||
</div> | ||
</div> | ||
|
||
<div class="mt-4 flex w-full flex-row gap-4"> | ||
<p-iconField iconPosition="left" class="w-1/2 [&_input]:w-full"> | ||
<p-inputIcon styleClass="pi pi-search" /> | ||
<input type="text" pInputText placeholder="Search..." /> | ||
</p-iconField> | ||
<p-dropdown | ||
[options]="sortOptions" | ||
[(ngModel)]="selectedSortOption" | ||
optionLabel="name" | ||
placeholder="Sort By..." | ||
class="w-1/2 [&>*]:w-full" | ||
/> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,85 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { MenuItem } from 'primeng/api'; | ||
import { ButtonModule } from 'primeng/button'; | ||
import { TabMenuModule } from 'primeng/tabmenu'; | ||
import { IconFieldModule } from 'primeng/iconfield'; | ||
import { InputIconModule } from 'primeng/inputicon'; | ||
import { InputTextModule } from 'primeng/inputtext'; | ||
import { DropdownModule } from 'primeng/dropdown'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { TabViewModule } from 'primeng/tabview'; | ||
import { SelectButtonModule } from 'primeng/selectbutton'; | ||
import { SplitButtonModule } from 'primeng/splitbutton'; | ||
import { MenubarModule } from 'primeng/menubar'; | ||
|
||
@Component({ | ||
selector: 'app-homepage', | ||
standalone: true, | ||
imports: [], | ||
imports: [ | ||
FormsModule, | ||
ButtonModule, | ||
TabMenuModule, | ||
TabViewModule, | ||
SelectButtonModule, | ||
IconFieldModule, | ||
InputIconModule, | ||
InputTextModule, | ||
DropdownModule, | ||
SplitButtonModule, | ||
MenubarModule, | ||
], | ||
templateUrl: './homepage.component.html', | ||
styleUrl: './homepage.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class HomepageComponent {} | ||
export class HomepageComponent { | ||
navMenuItems: MenuItem[] = [ | ||
{ | ||
label: 'Overview | Participants', | ||
}, | ||
{ | ||
label: 'Payments', | ||
routerLink: '/', // Just throwing this in there to make one selected by default | ||
}, | ||
{ | ||
label: 'Monitoring', | ||
}, | ||
]; | ||
|
||
paymentStatuses = [ | ||
{ | ||
label: 'All payments', | ||
value: 'all', | ||
}, | ||
{ | ||
label: 'Waiting for approval', | ||
value: 'waiting', | ||
}, | ||
{ | ||
label: 'In progress', | ||
value: 'in-progress', | ||
}, | ||
{ | ||
label: 'Completed', | ||
value: 'completed', | ||
}, | ||
]; | ||
selectedPaymentStatus = 'all'; | ||
|
||
sortOptions = [ | ||
{ | ||
name: 'Sort By: Last Updated', | ||
value: 'newest', | ||
}, | ||
{ | ||
name: 'Sort By: Name', | ||
value: 'name', | ||
}, | ||
]; | ||
selectedSortOption = 'newest'; | ||
|
||
downloadOptions = [ | ||
{ label: 'Unused Vouchers' }, | ||
{ label: 'Debit Card Usage' }, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@layer tailwind-base, primeng, tailwind-utilities; | ||
|
||
// Please take note of the order in which these are imported | ||
@import "tailwindcss/base.css" layer(tailwind-base); | ||
|
||
@import "primeng/resources/primeng.css"; | ||
@import "primeng/resources/themes/tailwind-light/theme.css"; | ||
@import "primeicons/primeicons.css"; | ||
|
||
@import "tailwindcss/components.css" layer(tailwind-utilities); | ||
@import "tailwindcss/utilities.css" layer(tailwind-utilities); | ||
|
||
body { | ||
@apply bg-grey-100; | ||
} |