Skip to content

Commit

Permalink
backoffice UI: home page link + use of fieldset
Browse files Browse the repository at this point in the history
  • Loading branch information
openi40 committed Jan 15, 2024
1 parent 26726fa commit fb1735d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import { MegaMenuItem } from 'primeng/api';
import { UI_MENU } from '@openi40/backoffice-ui';
import { BASE_PATH } from '@openi40/backoffice-api';
import { getBaseUrl } from "@openi40/common-ui";
const BACKOFFICE_MENU_ITEMS: MegaMenuItem[] = [{
const BACKOFFICE_MENU_ITEMS: MegaMenuItem[] = [
{ label:"Home",icon:"pi pi-home",automationId:true,url:"/"}
,{
label: 'companies organization',
icon: 'pi pi-fw pi-sitemap',
items: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { CheckboxModule } from 'primeng/checkbox';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { BreadcrumbModule } from 'primeng/breadcrumb';
import { MegaMenuModule } from 'primeng/megamenu';
import { FieldsetModule } from 'primeng/fieldset';
import { DetailUIFormComponent } from './ui-configurable/detail-ui-form/detail-ui-form.component';
import { UIConfiguredFormComponent } from './ui-configurable/ui-configured-form/ui-configured-form.component';
import { BlockUIModule } from 'primeng/blockui';
Expand All @@ -27,9 +28,9 @@ import { UIEntitesRelatedComponent } from './ui-configurable/ui-entities-related
import { ContextMenuModule } from 'primeng/contextmenu';
import { UINavigationComponent } from './ui-configurable/ui-navigation/ui-navigation.component';
@NgModule({
imports: [CommonModule, FormsModule, ReactiveFormsModule, TableModule, RouterModule, InputTextModule, DropdownModule, ButtonModule, AutoCompleteModule, CheckboxModule, CalendarModule, BlockUIModule, InputMaskModule,AccordionModule,ContextMenuModule,BreadcrumbModule,MegaMenuModule],
imports: [CommonModule, FormsModule, ReactiveFormsModule, TableModule, RouterModule, InputTextModule, DropdownModule, ButtonModule, AutoCompleteModule, CheckboxModule, CalendarModule, BlockUIModule, InputMaskModule,AccordionModule,ContextMenuModule,BreadcrumbModule,MegaMenuModule,FieldsetModule],
declarations: [UIConfigurableControlComponent, SearchUIFormComponent, DetailUIFormComponent, UIConfiguredFormComponent, UIConfigurableGridComponent,UIConfigurableEditableGridComponent,UIConfiguredFormArray,UIEntitesRelatedComponent,UINavigationComponent],
exports: [UIConfigurableControlComponent, SearchUIFormComponent, DetailUIFormComponent, UIConfiguredFormComponent, UIConfigurableGridComponent,UIConfigurableEditableGridComponent,UIConfiguredFormArray,UIEntitesRelatedComponent,UINavigationComponent],
providers: [FormGroupConfigurationService, DefaultGoToDetailService]
})
export class Openi40BackofficeMetaUIModule { }
export class Openi40BackofficeMetaUIModule { }
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ui-navigation></ui-navigation>
<h1>{{config.title}}</h1>
<div class="content" #mainContent>
<p-blockUI [target]="mainContent" [blocked]="loading">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
<p-fieldset legend="Edit/view form">
<ui-configured-form
[formGroup]="frmGroup"
[config]="config.formGroup"
Expand All @@ -22,4 +24,5 @@
></button>
</div>
</div>
</p-fieldset>
</div>
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
<ui-navigation></ui-navigation>
<div class="content" [formGroup]="frmGroup" *ngIf="frmGroup" #mainContent>
<p-blockUI [target]="mainContent" [blocked]="loading">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
<h1>{{config.title}}</h1>
<h2>Search filters</h2>
<div class="row">
<ui-configured-form [formGroup]="frmGroup" [config]="config.formGroup" [formTemplate]="formTemplate">

</ui-configured-form>
<div class="col-2">
<p-button label="Search" (onClick)="doSearch()" [disabled]="disabledSearch"></p-button>
</div>
<p-blockUI [target]="mainContent" [blocked]="loading">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
<h1>{{ config.title }}</h1>

<p-fieldset legend="Search filters">


<div class="row">
<ui-configured-form
[formGroup]="frmGroup"
[config]="config.formGroup"
[formTemplate]="formTemplate"
>
</ui-configured-form>
<div class="col-2">
<p-button
label="Search"
(onClick)="doSearch()"
[disabled]="disabledSearch"
></p-button>
</div>
<div class="row">
<div class="col-12">

<ui-configurable-grid
[columnsConfig]="columnsConfig"
[actualPage]="actualPage"
[externalPagingManagement]="true"
[paged]="true"
[data]="results"
[gotoDetailService]="gotoDetailService"
(actualPageChange)="pageChange($event)"
[entitiesReferences]="config?.entitiesReferences">
</ui-configurable-grid>

</div>
</div>
</p-fieldset>
<p-fieldset legend="Search results">
<div class="grid">
<div class="col-12">
<ui-configurable-grid
[columnsConfig]="columnsConfig"
[actualPage]="actualPage"
[externalPagingManagement]="true"
[paged]="true"
[data]="results"
[gotoDetailService]="gotoDetailService"
(actualPageChange)="pageChange($event)"
[entitiesReferences]="config?.entitiesReferences"
>
</ui-configurable-grid>
</div>
</div>
</div>
</p-fieldset>
</div>

0 comments on commit fb1735d

Please sign in to comment.