diff --git a/.prettierrc.json b/.prettierrc.json index df8e4b0..4e6fc5a 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -33,7 +33,8 @@ } ], "plugins": [ - "prettier-plugin-organize-imports" + "prettier-plugin-organize-imports", + "prettier-plugin-tailwindcss" ], "printWidth": 100, "semi": true, diff --git a/src/app/modules/products/components/form.component.ts b/src/app/modules/products/components/form.component.ts index f1d4d38..38ffb8a 100644 --- a/src/app/modules/products/components/form.component.ts +++ b/src/app/modules/products/components/form.component.ts @@ -2,7 +2,6 @@ import { ProductBrandsSelectComponent } from '@/modules/productBrands/components import { ProductCategoriesSelectComponent } from '@/modules/productCategories/components'; import { InputComponent } from '@/shared/components'; import { FormFooterActionsComponent } from '@/shared/components/formFooterActions/form-footer-actions.component'; -import { UikitFieldComponent } from '@/uikit'; import { Component, effect, EventEmitter, inject, Input, Output, signal } from '@angular/core'; import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms'; import { Dialog } from 'primeng/dialog'; @@ -17,7 +16,6 @@ import { ProductsService } from '../services/main.service'; Dialog, InputComponent, FormFooterActionsComponent, - UikitFieldComponent, ProductBrandsSelectComponent, ProductCategoriesSelectComponent, ], @@ -49,8 +47,8 @@ export class ProductFormComponent { name: [this.initialValues?.name || null, [Validators.required]], description: [this.initialValues?.description || null], // productType: [this.initialValues?.productType || null, [Validators.required]], - brandId: [this.initialValues?.brandId || null, [Validators.required]], - categoryId: [this.initialValues?.categoryId || null], + brandId: [this.initialValues?.brand?.id || null, [Validators.required]], + categoryId: [this.initialValues?.category?.id || null], }); submitLoading = signal(false); diff --git a/src/app/modules/products/components/fullForm/full-form.component.html b/src/app/modules/products/components/fullForm/full-form.component.html new file mode 100644 index 0000000..7b64565 --- /dev/null +++ b/src/app/modules/products/components/fullForm/full-form.component.html @@ -0,0 +1,55 @@ +
{{ product()?.description || "بدون توضیحات" }}
+{{ product()?.category?.name || "بدون دستهبندی" }}
+{{ product()?.brand?.name || "بدون برند" }}
+