Skip to content

Commit

Permalink
Merge pull request #64 from AmpersandTarski/feat/shared-buttons-add-e…
Browse files Browse the repository at this point in the history
…dit-delete

Feat/shared-buttons-add-edit-delete
  • Loading branch information
LiWeiYeh committed Nov 28, 2022
2 parents d348ebb + 5af5d65 commit 53b26b1
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<div *ngIf="data$ | async as data">
<div>
<h2>Active Projects</h2>
<app-button-add></app-button-add>
</div>
<app-box-table [data]="data" sortable sortBy="Name" order="desc">
<ng-template boxTableHeader>
<th>Projects</th>
Expand All @@ -9,6 +13,7 @@
<th>Start</th>
<th>Status</th>
<th>Active</th>
<th></th>
</ng-template>
<ng-template [boxTableRow]="data" let-row>
<td>
Expand All @@ -34,6 +39,12 @@
<td>
<app-atomic-boolean [property]="row.Active" isUni crud="CRuD"></app-atomic-boolean>
</td>
<td>
<app-button-edit></app-button-edit>
</td>
<td>
<app-button-delete></app-button-delete>
</td>
</ng-template>
</app-box-table>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button pButton type="button" label="" icon="pi pi-plus"></button>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-button-add',
templateUrl: './button-add.component.html',
styleUrls: ['./button-add.component.scss'],
})
export class ButtonAddComponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button pButton type="button" label="" class="p-button-danger" icon="pi pi-trash"></button>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-button-delete',
templateUrl: './button-delete.component.html',
styleUrls: ['./button-delete.component.scss'],
})
export class ButtonDeleteComponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button pButton type="button" label="" icon="pi pi-pencil"></button>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-button-edit',
templateUrl: './button-edit.component.html',
styleUrls: ['./button-edit.component.scss'],
})
export class ButtonEditComponent {}
11 changes: 11 additions & 0 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import { TableModule } from 'primeng/table';
import { SplitButtonModule } from 'primeng/splitbutton';
import { PasswordModule } from 'primeng/password';
import { TabViewModule } from 'primeng/tabview';
import { ButtonModule } from 'primeng/button';
import { ButtonEditComponent } from './button-components/button-edit/button-edit.component';
import { ButtonDeleteComponent } from './button-components/button-delete/button-delete.component';
import { ButtonAddComponent } from './button-components/button-add/button-add.component';

@NgModule({
declarations: [
Expand All @@ -46,6 +50,9 @@ import { TabViewModule } from 'primeng/tabview';
BoxTableHeaderTemplateDirective,
BoxTableRowTemplateDirective,
BoxTabComponent,
ButtonEditComponent,
ButtonDeleteComponent,
ButtonAddComponent,
],
imports: [
CommonModule,
Expand All @@ -60,6 +67,7 @@ import { TabViewModule } from 'primeng/tabview';
SplitButtonModule,
PasswordModule,
TabViewModule,
ButtonModule,
],
exports: [
AtomicAlphanumericComponent,
Expand All @@ -76,6 +84,9 @@ import { TabViewModule } from 'primeng/tabview';
BoxTableHeaderTemplateDirective,
BoxTableRowTemplateDirective,
BoxTabComponent,
ButtonEditComponent,
ButtonDeleteComponent,
ButtonAddComponent,
],
})
export class SharedModule {}

0 comments on commit 53b26b1

Please sign in to comment.