feat: Refactor sale invoice store to use new response model and improve state management
fix: Update single component to correctly bind invoice data feat: Enhance partner info model with detailed license status refactor: Simplify account list component by removing unnecessary details fix: Correctly reference username in consumer account form feat: Add POS related fields to consumer account list chore: Update models to include charge account details for partners feat: Implement charge account dialog for partner consumers feat: Create API routes for accounts charge functionality feat: Add charge account service for handling requests feat: Introduce license info template component for dashboard refactor: Update dashboard view to display license information fix: Improve layout component to handle POS information more effectively chore: Clean up unused imports and components in various files feat: Add loading state handling in landing views feat: Implement charge account form dialog for partner consumers
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
<div class="w-svw h-svh bg-surface-ground flex flex-col gap-4 p-4">
|
||||
<div class="w-full flex items-center gap-4 shrink-0 justify-between">
|
||||
<div class="flex gap-2 items-center">
|
||||
<div class="w-10 h-10">
|
||||
<img [src]="placeholderLogo" alt="Logo" class="w-full h-full object-cover rounded-md bg-surface-card" />
|
||||
</div>
|
||||
@if (posInfo()) {
|
||||
<span class="text-lg font-bold">{{ posInfo()?.name }} - شعبه {{ posInfo()?.complex?.name }}</span>
|
||||
<div class="w-10 h-10">
|
||||
<img [src]="placeholderLogo" alt="Logo" class="w-full h-full object-cover rounded-md bg-surface-card" />
|
||||
</div>
|
||||
<span class="text-lg font-bold">
|
||||
{{ posInfo()?.name }} ({{ posInfo()?.complex!.name }} - {{ posInfo()?.businessActivity!.name }})
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<div class="flex gap-2 items-center">
|
||||
|
||||
@@ -8,8 +8,7 @@ import { ButtonDirective } from 'primeng/button';
|
||||
import { Card } from 'primeng/card';
|
||||
import { Menu } from 'primeng/menu';
|
||||
import images from 'src/assets/images';
|
||||
import { PosProfileStore } from '../store';
|
||||
import { PosStore } from '../store/pos.store';
|
||||
import { PosInfoStore, PosProfileStore } from '../store';
|
||||
import { PosChooseCardsComponent } from './choose-pos.component';
|
||||
|
||||
@Component({
|
||||
@@ -28,19 +27,20 @@ import { PosChooseCardsComponent } from './choose-pos.component';
|
||||
export class PosLayoutComponent {
|
||||
constructor() {}
|
||||
|
||||
private readonly posInfoStore = inject(PosStore);
|
||||
private readonly posProfileStore = inject(PosProfileStore);
|
||||
private readonly posInfoStore = inject(PosInfoStore);
|
||||
private readonly authService = inject(AuthService);
|
||||
|
||||
readonly posInfoLoading = computed(() => this.posInfoStore.loading());
|
||||
readonly posInfo = computed(() => this.posInfoStore.entity());
|
||||
readonly posInfoError = computed(() => this.posInfoStore.error());
|
||||
readonly posProfileLoading = computed(() => this.posProfileStore.loading());
|
||||
readonly posProfile = computed(() => this.posProfileStore.entity());
|
||||
readonly posProfileError = computed(() => this.posProfileStore.error());
|
||||
|
||||
readonly loading = computed(() => this.posInfoLoading() || this.posProfileLoading());
|
||||
readonly error = computed(() => this.posInfoError() || this.posProfileError());
|
||||
readonly posInfoLoading = computed(() => this.posInfoStore.loading());
|
||||
readonly posInfo = computed(() => this.posInfoStore.entity());
|
||||
readonly posInfoError = computed(() => this.posInfoStore.error());
|
||||
|
||||
readonly loading = computed(() => this.posProfileLoading());
|
||||
readonly error = computed(() => this.posProfileError());
|
||||
|
||||
logout = () => {
|
||||
this.authService.logout();
|
||||
@@ -64,8 +64,11 @@ export class PosLayoutComponent {
|
||||
now = new Date();
|
||||
|
||||
getData() {
|
||||
this.posProfileStore.getData().subscribe();
|
||||
this.posInfoStore.getData().subscribe();
|
||||
this.posProfileStore.getData().subscribe({
|
||||
next: () => {
|
||||
this.posInfoStore.getData().subscribe();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onChoosePos() {
|
||||
|
||||
Reference in New Issue
Block a user