update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<app-card-data cardTitle="اطلاعات مشتری" [editable]="true" [(editMode)]="editMode">
|
||||
<ng-template #moreAction> </ng-template>
|
||||
<ng-template #moreActions> </ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="grid grid-cols-3 gap-4 items-center">
|
||||
<app-key-value label="نام مشتری" [value]="consumer()?.fullname" />
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<div class="max-h-[500px] flex">
|
||||
<div class="max-h-125 flex">
|
||||
<admin-guild-good-categories-list [guildId]="guildId()" class="w-full" />
|
||||
</div>
|
||||
<div class="max-h-[500px] flex">
|
||||
<div class="max-h-125 flex">
|
||||
<admin-guild-goods-list [guildId]="guildId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export class LicenseFormComponent extends AbstractFormDialog<ILicenseRequest, IL
|
||||
private service = inject(LicensesService);
|
||||
|
||||
form = this.fb.group({
|
||||
name: [this.initialValues?.name || '', [Validators.required]],
|
||||
name: ['', [Validators.required]],
|
||||
});
|
||||
|
||||
override submitForm(payload: ILicenseRequest) {
|
||||
|
||||
+19
-1
@@ -1,9 +1,27 @@
|
||||
import ISummary from '@/core/models/summary';
|
||||
|
||||
export interface ILicenseRawResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
starts_at: string;
|
||||
expires_at: string;
|
||||
consumer: Consumer;
|
||||
license: License;
|
||||
}
|
||||
export interface ILicenseResponse extends ILicenseRawResponse {}
|
||||
|
||||
export interface ILicenseRequest {
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface License {
|
||||
id: string;
|
||||
charged_license_transaction: {
|
||||
partner: ISummary;
|
||||
};
|
||||
}
|
||||
interface Consumer {
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
mobile_number: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { AbstractList } from '@/shared/abstractClasses/abstract-list';
|
||||
import { PageDataListComponent } from '@/shared/components/pageDataList/page-data-list.component';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ILicenseResponse } from '../models';
|
||||
import { ILicenseRawResponse, ILicenseResponse } from '../models';
|
||||
import { LicensesService } from '../services/main.service';
|
||||
|
||||
@Component({
|
||||
@@ -23,14 +23,15 @@ export class LicensesComponent extends AbstractList<ILicenseResponse> {
|
||||
return `${item.consumer.first_name} ${item.consumer.last_name}`;
|
||||
},
|
||||
},
|
||||
{ field: 'expires_at', header: 'تاریخ انقضا', type: 'date' },
|
||||
{
|
||||
field: 'partner',
|
||||
header: 'ارایه شده توسط',
|
||||
customDataModel(item) {
|
||||
return item.partner?.name || 'برند نرمافزار';
|
||||
customDataModel(item: ILicenseRawResponse) {
|
||||
return item.license.charged_license_transaction.partner.name || 'برند نرمافزار';
|
||||
},
|
||||
},
|
||||
{ field: 'expires_at', header: 'تاریخ انقضا', type: 'date' },
|
||||
{ field: 'created_at', header: 'تاریخ ایجاد', type: 'date' },
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -17,9 +17,13 @@ export class AdminPartnerChargeLicenseTransactionListComponent extends AbstractL
|
||||
|
||||
override setColumns(): void {
|
||||
this.columns = [
|
||||
{ field: 'id', header: 'شناسه', type: 'id' },
|
||||
{ field: 'charged_license_count', header: 'تعداد لایسنس خریداری شده' },
|
||||
{ field: 'remained_license_count', header: 'تعداد لایسنس فروخته نشده' },
|
||||
{ field: 'tracking_code', header: 'کد پیگیری' },
|
||||
{ field: 'charged_license_count', header: 'لایسنسهای خریداری شده' },
|
||||
{ field: 'remained_license_count', header: 'لایسنسهای باقیمانده' },
|
||||
{
|
||||
field: 'activated_license_count',
|
||||
header: 'لایسنسهای فروخته شده',
|
||||
},
|
||||
{
|
||||
field: 'activation_expires_at',
|
||||
header: 'تاریخ انقضا',
|
||||
|
||||
+2
@@ -1,8 +1,10 @@
|
||||
export interface IPartnerChargeLicenseTransactionRawResponse {
|
||||
id: string;
|
||||
created_at: string;
|
||||
tracking_code: string;
|
||||
activation_expires_at: string;
|
||||
charged_license_count: number;
|
||||
activated_license_count: number;
|
||||
remained_license_count: number;
|
||||
}
|
||||
export interface IPartnerChargeLicenseTransactionResponse extends IPartnerChargeLicenseTransactionRawResponse {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<app-card-data cardTitle="اطلاعات شریک تجاری" [editable]="true" [(editMode)]="editMode">
|
||||
<ng-template #moreAction>
|
||||
<ng-template #moreActions>
|
||||
<p-button outlined size="small" (onClick)="openChargeDialog()"> شارژ لایسنس </p-button>
|
||||
</ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
@@ -22,15 +22,15 @@
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<div class="max-h-[500px] flex">
|
||||
<div class="max-h-125 flex">
|
||||
<admin-partner-licenses [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
<div class="max-h-[500px] flex">
|
||||
<div class="max-h-125 flex">
|
||||
<admin-partner-chargeLicenseTransaction-list [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
<div class="max-h-[500px] flex">
|
||||
<div class="max-h-125 flex">
|
||||
<superAdmin-partner-account-list [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user