feat: add logo image and RTL support styles
- Added logo image to assets. - Implemented RTL support styles in rtlSupport.scss for various components including breadcrumb, datatable, and tree node toggle button. chore: configure environment files for production, staging, and development - Created environment.prod.ts for production settings. - Created environment.staging.ts for staging settings. - Created environment.ts for local development settings. feat: define custom theme preset - Added presets.ts to define a custom theme preset using PrimeUIX with specific component styles and semantic colors. chore: set up proxy configuration for local development
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<div class="inline-flex items-center gap-2 flex-wrap">
|
||||
<p-badge
|
||||
[value]="value ? confirmedMessage : rejectedMessage"
|
||||
[severity]="value ? 'success' : 'danger'"
|
||||
class="cursor-pointer"
|
||||
(click)="onClick($event)"
|
||||
/>
|
||||
<p-confirmpopup />
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { ConfirmationService } from 'primeng/api';
|
||||
import { Badge } from 'primeng/badge';
|
||||
import { ConfirmPopup } from 'primeng/confirmpopup';
|
||||
|
||||
@Component({
|
||||
selector: 'inline-confirmation',
|
||||
templateUrl: './inline-confirmation.component.html',
|
||||
imports: [ConfirmPopup, Badge],
|
||||
providers: [ConfirmationService],
|
||||
})
|
||||
export class InlineConfirmationComponent {
|
||||
@Input() value!: boolean;
|
||||
@Input() confirmedMessage?: string = 'اطلاعات تایید شده است';
|
||||
@Input() rejectedMessage?: string = 'اطلاعات تایید نشده است';
|
||||
@Input() loading?: boolean = false;
|
||||
@Input() onConfirmMessage: string = 'آیا از تایید این اطلاعات اطمینان دارید؟';
|
||||
@Input() onRejectMessage: string = 'آیا از رد این اطلاعات اطمینان دارید؟';
|
||||
@Input() confirmationHeader: string = 'تایید تغییر وضعیت';
|
||||
@Input() confirmationIcon: string = 'pi pi-exclamation-triangle';
|
||||
@Input() acceptCTALabel: string = 'بله';
|
||||
@Input() rejectCTALabel: string = 'خیر';
|
||||
|
||||
@Output() onConfirm = new EventEmitter<void>();
|
||||
@Output() onReject = new EventEmitter<void>();
|
||||
|
||||
constructor(private confirmationService: ConfirmationService) {}
|
||||
|
||||
toggle = () => {
|
||||
if (this.value) {
|
||||
this.onReject.emit();
|
||||
} else {
|
||||
this.onConfirm.emit();
|
||||
}
|
||||
};
|
||||
|
||||
onClick($event: Event) {
|
||||
this.showConfirmation($event);
|
||||
}
|
||||
|
||||
showConfirmation(event: Event) {
|
||||
this.confirmationService.confirm({
|
||||
target: (event.target as HTMLElement)?.parentNode?.parentNode!,
|
||||
message: this.value ? this.onRejectMessage : this.onConfirmMessage,
|
||||
header: this.confirmationHeader,
|
||||
icon: this.confirmationIcon,
|
||||
acceptLabel: this.acceptCTALabel,
|
||||
rejectLabel: this.rejectCTALabel,
|
||||
rejectButtonProps: {
|
||||
variant: 'outlined',
|
||||
},
|
||||
accept: () => this.toggle(),
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user