init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!-- <uikit-field label="" [control]="control" [showLabel]="showLabel" [showErrors]="showErrors">
|
||||
<p-select
|
||||
[loading]="loading()"
|
||||
[options]="items()"
|
||||
[optionLabel]="optionLabel"
|
||||
[optionValue]="selectOptionValue"
|
||||
[placeholder]="placeholder"
|
||||
[formControl]="control"
|
||||
[showClear]="showClear"
|
||||
[filter]="true"
|
||||
appendTo="body"
|
||||
>
|
||||
@if (canInsert) {
|
||||
<ng-template #footer>
|
||||
<div class="p-3">
|
||||
<p-button
|
||||
[label]="addCtaLabel"
|
||||
fluid
|
||||
severity="secondary"
|
||||
text
|
||||
size="small"
|
||||
icon="pi pi-plus"
|
||||
(onClick)="onOpenForm()"
|
||||
/>
|
||||
</div>
|
||||
</ng-template>
|
||||
}
|
||||
</p-select>
|
||||
@if (canInsert) {
|
||||
<ng-content></ng-content>
|
||||
}
|
||||
</uikit-field> -->
|
||||
@@ -0,0 +1,33 @@
|
||||
// import { Maybe } from '@/core';
|
||||
// import { UikitFieldComponent } from '@/uikit';
|
||||
// import { Component, EventEmitter, Input, model, Output, signal } from '@angular/core';
|
||||
// import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
// import { Button } from 'primeng/button';
|
||||
// import { Select } from 'primeng/select';
|
||||
// import { Observable } from 'rxjs';
|
||||
|
||||
// export interface ISelectItem {
|
||||
// id: number;
|
||||
// name: string;
|
||||
// }
|
||||
|
||||
// @Component({
|
||||
// selector: 'uikit-select-field',
|
||||
// templateUrl: 'select-field.component.html',
|
||||
// imports: [UikitFieldComponent, Select, Button, ReactiveFormsModule],
|
||||
// })
|
||||
// export class SelectComponent<T = ISelectItem, serviceResponse = T[]> extends AbstractSelectComponent<T, serviceResponse> {
|
||||
// @Input() control = new FormControl<Maybe<number | T>>(null);
|
||||
// @Input() canInsert: boolean = false;
|
||||
// @Input() showLabel: boolean = true;
|
||||
// @Input() showErrors: boolean = true;
|
||||
// @Input() showClear: boolean = true;
|
||||
// @Input() isFullDataOptionValue: boolean = false;
|
||||
// @Input() optionValue = 'id';
|
||||
// @Input() optionLabel: string = 'name';
|
||||
// @Input() label!: string;
|
||||
// @Input() placeholder!: string;
|
||||
// @Input() addCtaLabel: string = 'ایجاد مورد جدید';
|
||||
// @Output() onChange = new EventEmitter<Maybe<T>>();
|
||||
// @Output() onSetDefaultDataItem = new EventEmitter<T>();
|
||||
// }
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="block text-center py-12 bg-surface-overlay">
|
||||
<div class="flex flex-col text-center py-12 bg-surface-overlay">
|
||||
<ng-container>
|
||||
<i [class]="icon + '!text-6xl mb-4 text-surface-500'" aria-hidden="true"></i>
|
||||
<i [class]="icon + 'text-6xl! mb-4 text-surface-500'" aria-hidden="true"></i>
|
||||
</ng-container>
|
||||
<span class="text-xl font-semibold mb-2 text-surface-500 block">{{ title }}</span>
|
||||
@if (description) {
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
<ng-content select="[cta]" #cta class="mt-4 block"></ng-content>
|
||||
@if (!hasCtaContent && ctaLabel && showCTA) {
|
||||
<p-button class="mt-2" size="small" (click)="ctaClick.emit()">
|
||||
<p-button class="mt-4" size="small" (click)="ctaClick.emit()">
|
||||
{{ ctaLabel }}
|
||||
<i class="pi pi-plus" pButtonIcon></i>
|
||||
</p-button>
|
||||
|
||||
Reference in New Issue
Block a user