@if (isLoading) {
}
Product Management
@if (products && products.length > 0 || showAddForm) {
Product ID
Product Name
@if (showAddForm) {
Auto-generated
@if (addProductImagePreview) { Preview } @else {
NO IMAGE
}
Product Name
Price Category @for (category of categories; track category) { @if (category !== 'All') { {{ category }} } }
Billing Date Expiration Date
Creator will be set automatically from your account
@if (addFlashMessage) {
@if (addFlashMessage === 'success') { Product added successfully } @if (addFlashMessage === 'error') { Error adding product, try again! }
}
} @for (product of products; track trackByFn($index, product)) {
@if (getImageUrl(product.product_image)) { } @else {
NO THUMB
}
{{ product.product_id }}
{{ product.product_name }}
@if (selectedProduct?.product_id === product.product_id) {
@if (getImageUrl(product.product_image)) { } @else {
NO IMAGE
}
Product Name Product ID
Price Created Date
Category @for (category of categories; track category) { @if (category !== 'All') { {{ category }} } }
Billing Date Expiration Date
@if (isExpiringSoon(product) || isExpired(product)) {
@if (isExpired(product)) { This product has expired! } @else { This product expires in {{ getDaysUntilExpiration(product) }} days! }
} @if (product.created_by_username) { Created By }
@if (flashMessage) {
@if (flashMessage === 'success') { Product updated } @if (flashMessage === 'error') { An error occurred, try again! }
}
}
}
} @else {
There are no products!
}