-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get data to the edit compoment from route ID Add tp toolbar remove list route implement service layer ui path to edit via select remove list from paths implement edit addd the service spy parts remove unnecessary imports test it new tps should be active
- Loading branch information
1 parent
cc14d5a
commit 95f674e
Showing
15 changed files
with
601 additions
and
104 deletions.
There are no files selected for viewing
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
6 changes: 4 additions & 2 deletions
6
...onfigs/transport-providers/tranport-providers-list/transport-provider-list.component.html
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,5 @@ | ||
<app-records-table [values]="transportProviders$ | async" | ||
<app-records-table | ||
[values]="transportProviders$ | async" | ||
[excludeCols]="excludeCols" | ||
(onRowSelect)="handleRowSelect($event)"></app-records-table> | ||
(selectedRecord)="onRowSelect($event)" | ||
></app-records-table> |
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
25 changes: 25 additions & 0 deletions
25
src/app/configs/transport-providers/transport-providers-container.component.ts
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,25 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "app-transport-providers-container", | ||
template: ` | ||
<p-toolbar styleClass="p-shadow-1 p-mb-4"> | ||
<div class="p-toolbar-group-left"></div> | ||
<div class="p-toolbar-group-right"> | ||
<button | ||
pButton | ||
pRipple | ||
class="p-button-raised p-mr-2" | ||
icon="pi pi-plus" | ||
label="New" | ||
tooltipPosition="bottom" | ||
routerLink="/configuration/transport-providers/new" | ||
></button> | ||
</div> | ||
</p-toolbar> | ||
<router-outlet></router-outlet> | ||
`, | ||
styles: [], | ||
}) | ||
export class TransportProvidersContainerComponent {} |
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,4 @@ | ||
:host ::ng-deep .p-chip.custom-chip { | ||
background: var(--primary-color); | ||
color: var(--primary-color-text); | ||
} |
165 changes: 164 additions & 1 deletion
165
...figs/transport-providers/transport-providers-edit/transport-providers-edit.component.html
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,164 @@ | ||
<p>transport-providers-edit works!</p> | ||
<p-tabView> | ||
<p-tabPanel header="Transport Provider"> | ||
<ng-container *ngIf="record$ | async as r"> | ||
<p-card styleClass="p-mb-4"> | ||
<ng-template pTemplate="title"> | ||
<span> | ||
{{ r.text }} | ||
</span> | ||
</ng-template> | ||
<ng-template pTemplate="subtitle"> | ||
<span> {{ tpHelperText }} </span> | ||
</ng-template> | ||
<div class="content"> | ||
<form #editForm="ngForm" (ngSubmit)="save()"> | ||
<div class="p-fluid p-formgrid p-grid"> | ||
<div class="p-field p-col-12 p-input-filled"> | ||
<span class="p-float-label"> | ||
<input | ||
pInputText | ||
[(ngModel)]="r.key" | ||
id="key" | ||
name="key" | ||
required | ||
autofocus | ||
ngModel | ||
pattern="^[a-z-0-9_.-]*$" | ||
#key="ngModel" | ||
/> | ||
<label for="key">Key</label> | ||
</span> | ||
<small class="p-error" *ngIf="!r.key">Key is required</small> | ||
<small class="p-error" *ngIf="key.errors?.pattern">No spaces or upper-case letters</small> | ||
</div> | ||
|
||
<div class="p-field p-col-12 p-input-filled"> | ||
<span class="p-float-label"> | ||
<input | ||
pInputText | ||
[(ngModel)]="r.text" | ||
id="text" | ||
name="text" | ||
required | ||
/> | ||
<label for="text">Text</label> | ||
</span> | ||
<small class="p-error" *ngIf="submitted && !r.key" | ||
>Text is required</small | ||
> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<ng-template pTemplate="footer"> | ||
<p-toolbar> | ||
<div class="p-toolbar-group-left"> | ||
<button | ||
pButton | ||
pRipple | ||
class="p-button-raised p-mr-2" | ||
icon="pi pi-save" | ||
tooltipPosition="bottom" | ||
label="Save" | ||
[disabled]="key.errors?.pattern" | ||
(click)="save(r)" | ||
></button> | ||
<button | ||
pButton | ||
pRipple | ||
class="p-button-warning p-button-raised" | ||
icon="pi pi-ban" | ||
tooltipPosition="bottom" | ||
label="Cancel" | ||
(click)="cancel()" | ||
></button> | ||
</div> | ||
|
||
<div class="p-toolbar-group-right"> | ||
<button | ||
pButton | ||
pRipple | ||
class="p-button-danger p-button-raised" | ||
icon="pi pi-times" | ||
tooltipPosition="bottom" | ||
label="Delete" | ||
(click)="confirm($event, r)" | ||
></button> | ||
<p-confirmPopup></p-confirmPopup> | ||
</div> | ||
</p-toolbar> | ||
</ng-template> | ||
</p-card> | ||
<p-fieldset legend="System Fields" [toggleable]="true" [collapsed]="true"> | ||
<div class="p-d-flex"> | ||
<div class="p-mr-2 p-d-flex p-flex-column p-jc-start p-ai-center"> | ||
<div> | ||
<p-chip>Record Id</p-chip> | ||
</div> | ||
<div> | ||
<span> | ||
{{ r.id }} | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<p-divider layout="vertical"></p-divider> | ||
|
||
<div class="p-mr-2 p-d-flex p-flex-column p-jc-start p-ai-center"> | ||
<div class="text-900 mb-3 font-medium"> | ||
<p-chip>Created By</p-chip> | ||
</div> | ||
<span class="text-700 text-sm line-height-3">{{ | ||
r.createdby | ||
}}</span> | ||
</div> | ||
|
||
<p-divider layout="vertical"></p-divider> | ||
|
||
<div class="p-mr-2 p-d-flex p-flex-column p-jc-start p-ai-center"> | ||
<div class="text-900 mb-3 font-medium"> | ||
<p-chip>Date Created</p-chip> | ||
</div> | ||
<span class="text-700 text-sm line-height-3">{{ | ||
r.datecreated | date: "short" | ||
}}</span> | ||
</div> | ||
|
||
<p-divider layout="vertical"></p-divider> | ||
|
||
<div class="p-mr-2 p-d-flex p-flex-column p-jc-start p-ai-center"> | ||
<div class="text-900 mb-3 font-medium"> | ||
<p-chip>Updated By</p-chip> | ||
</div> | ||
<span class="text-700 text-sm line-height-3"> | ||
{{ r.updatedby }}</span | ||
> | ||
</div> | ||
|
||
<p-divider layout="vertical"></p-divider> | ||
|
||
<div class="p-mr-2 p-d-flex p-flex-column p-jc-start p-ai-center"> | ||
<div class="text-900 mb-3 font-medium"> | ||
<p-chip>Date Updated</p-chip> | ||
</div> | ||
<span class="text-700 text-sm line-height-3"> | ||
{{ r.dateupdated | date: "short" }} | ||
</span> | ||
</div> | ||
</div> | ||
</p-fieldset> | ||
</ng-container> | ||
</p-tabPanel> | ||
|
||
<p-tabPanel header="Availabilities"> | ||
<p> | ||
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium | ||
doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo | ||
inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. | ||
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut | ||
fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem | ||
sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius | ||
modi. | ||
</p> | ||
</p-tabPanel> | ||
</p-tabView> |
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
Oops, something went wrong.