@if (isLoading) {
}
SubCategory Management
@if (subCategories$ | async; as subCategories) { @if (subCategories.length > 0 || selectedSubCategory) {
SubCategory ID
Name
Actions
@if (selectedSubCategory && !selectedSubCategory.id) {
Auto-generated
New SubCategory
} @for (subCategory of subCategories; track trackByFn($index, subCategory)) {
{{ subCategory.sub_category_id }}
{{ subCategory.name }}
@if (selectedSubCategory?.id === subCategory.id) {
} }
} @else {

No sub-categories found

Get started by creating your first sub-category

} }

{{ subCategory.id ? 'Edit SubCategory' : 'Create New SubCategory' }}

@if (subCategory.sub_category_id) {

SubCategory ID: {{ subCategory.sub_category_id }}

} @else {

SubCategory ID will be auto-generated from name

}
SubCategory Name Name is required ID will be: {{ previewSubCategoryId }} Branch {{ branch.name }} ({{ branch.code }}) Branch is required Branch ID Auto-filled from branch selection Branch Name Auto-filled from branch selection Brand @if (!selectedBranchId) { Select branch first } {{ brand.name }} Brand is required Brands filtered by selected branch Brand ID Auto-filled from brand selection Category @if (!selectedBrandId) { Select brand first } {{ category.name }} Category is required Categories filtered by selected brand Category ID Auto-filled from category selection Category Name Auto-filled from category selection @if (subCategory.id && subCategory.created_by_username) { Created By }
@if (imagePreview || subCategory.image) { } @else {
}

PNG, JPG, GIF up to 5MB

@if (imagePreview || subCategory.image) { }
@if (subCategory.id) {
Created: {{ subCategory.created_at | date:'medium' }}
@if (subCategory.updated_at && subCategory.updated_at !== subCategory.created_at) {
Last Updated: {{ subCategory.updated_at | date:'medium' }}
}
}
@if (flashMessage) {
@if (flashMessage === 'success') { {{ subCategory.id ? 'Updated' : 'Created' }} successfully } @if (flashMessage === 'error') { Error occurred }
}