diff --git a/app/Exports/BrandExport.php b/app/Exports/BrandExport.php
deleted file mode 100644
index c438588..0000000
--- a/app/Exports/BrandExport.php
+++ /dev/null
@@ -1,132 +0,0 @@
-name,
- formatDateLocalized($brand->created_at, 'd/m/Y H:i'),
- formatDateLocalized($brand->updated_at, 'd/m/Y H:i'),
- ];
- }
-
- public function columnWidths(): array
- {
- return [
- 'A' => 20, // Brand Name
- 'B' => 18, // Created Date
- 'C' => 18, // Updated Date
- ];
- }
-
- /**
- * @return array
- */
- public function styles(Worksheet $sheet)
- {
- $lastRow = $sheet->getHighestRow();
- $lastColumn = $sheet->getHighestColumn();
-
- // Header style
- $headerStyle = [
- 'font' => [
- 'bold' => true,
- 'size' => 12,
- 'color' => ['rgb' => 'FFFFFF'],
- ],
- 'fill' => [
- 'fillType' => Fill::FILL_SOLID,
- 'startColor' => ['rgb' => '71717A'], // Zinc - elegant
- ],
- 'alignment' => [
- 'horizontal' => Alignment::HORIZONTAL_CENTER,
- 'vertical' => Alignment::VERTICAL_CENTER,
- ],
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- ];
-
- // Data rows style
- $dataStyle = [
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- 'alignment' => [
- 'vertical' => Alignment::VERTICAL_TOP,
- ],
- ];
-
- return [
- // Header styling
- 1 => $headerStyle,
-
- // Data rows styling
- 'A2:'.$lastColumn.$lastRow => $dataStyle,
- ];
- }
-
- public function registerEvents(): array
- {
- return [
- AfterSheet::class => function (AfterSheet $event) {
- // Auto-size columns with max width
- foreach (range('A', 'C') as $column) {
- $event->sheet->getColumnDimension($column)->setAutoSize(true);
- }
-
- // Set row height for header
- $event->sheet->getRowDimension(1)->setRowHeight(25);
- },
- ];
- }
-}
diff --git a/app/Exports/FormulaExport.php b/app/Exports/FormulaExport.php
deleted file mode 100644
index 2849eff..0000000
--- a/app/Exports/FormulaExport.php
+++ /dev/null
@@ -1,138 +0,0 @@
-quality,
- $formula->size,
- $formula->volume,
- formatDateLocalized($formula->created_at, 'd/m/Y H:i'),
- formatDateLocalized($formula->updated_at, 'd/m/Y H:i'),
- ];
- }
-
- public function columnWidths(): array
- {
- return [
- 'A' => 18, // Quality
- 'B' => 15, // Size (ML)
- 'C' => 15, // Volume (ML)
- 'D' => 21, // Created Date
- 'E' => 21, // Updated Date
- ];
- }
-
- /**
- * @return array
- */
- public function styles(Worksheet $sheet)
- {
- $lastRow = $sheet->getHighestRow();
- $lastColumn = $sheet->getHighestColumn();
-
- // Header style
- $headerStyle = [
- 'font' => [
- 'bold' => true,
- 'size' => 12,
- 'color' => ['rgb' => 'FFFFFF'],
- ],
- 'fill' => [
- 'fillType' => Fill::FILL_SOLID,
- 'startColor' => ['rgb' => '475569'], // Slate - elegant
- ],
- 'alignment' => [
- 'horizontal' => Alignment::HORIZONTAL_CENTER,
- 'vertical' => Alignment::VERTICAL_CENTER,
- ],
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- ];
-
- // Data rows style
- $dataStyle = [
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- 'alignment' => [
- 'vertical' => Alignment::VERTICAL_TOP,
- ],
- ];
-
- return [
- // Header styling
- 1 => $headerStyle,
-
- // Data rows styling
- 'A2:'.$lastColumn.$lastRow => $dataStyle,
- ];
- }
-
- public function registerEvents(): array
- {
- return [
- AfterSheet::class => function (AfterSheet $event) {
- // Auto-size columns with max width
- foreach (range('A', 'E') as $column) {
- $event->sheet->getColumnDimension($column)->setAutoSize(true);
- }
-
- // Set row height for header
- $event->sheet->getRowDimension(1)->setRowHeight(25);
- },
- ];
- }
-}
diff --git a/app/Exports/PerfumeExport.php b/app/Exports/PerfumeExport.php
deleted file mode 100644
index 9e61a4e..0000000
--- a/app/Exports/PerfumeExport.php
+++ /dev/null
@@ -1,168 +0,0 @@
-get();
- }
-
- public function title(): string
- {
- return 'Data Parfum';
- }
-
- public function headings(): array
- {
- return [
- 'Aroma',
- 'SKU',
- 'Merek',
- 'Konsentrasi',
- 'Harga Jual',
- 'Base Notes',
- 'Middle Notes',
- 'Top Notes',
- 'Deskripsi',
- 'Tanggal Dibuat',
- 'Tanggal Diperbarui',
- ];
- }
-
- /**
- * @param Perfume $perfume
- */
- public function map($perfume): array
- {
- return [
- $perfume->name,
- $perfume->sku,
- $perfume->brand?->name,
- $perfume->concentration->label(),
- $perfume->sale_price,
- $perfume->base_notes,
- $perfume->middle_notes,
- $perfume->top_notes,
- strip_tags($perfume->description),
- formatDateLocalized($perfume->created_at, 'd/m/Y H:i'),
- formatDateLocalized($perfume->updated_at, 'd/m/Y H:i'),
- ];
- }
-
- public function columnWidths(): array
- {
- return [
- 'A' => 28, // Perfume Name
- 'B' => 18, // SKU
- 'C' => 23, // Brand
- 'D' => 23, // Concentration
- 'E' => 18, // Sale Price
- 'F' => 23, // Base Notes
- 'G' => 23, // Middle Notes
- 'H' => 23, // Top Notes
- 'I' => 35, // Description
- 'J' => 21, // Created Date
- 'K' => 21, // Updated Date
- ];
- }
-
- /**
- * @return array
- */
- public function styles(Worksheet $sheet)
- {
- $lastRow = $sheet->getHighestRow();
- $lastColumn = $sheet->getHighestColumn();
-
- // Header style
- $headerStyle = [
- 'font' => [
- 'bold' => true,
- 'size' => 12,
- 'color' => ['rgb' => 'FFFFFF'],
- ],
- 'fill' => [
- 'fillType' => Fill::FILL_SOLID,
- 'startColor' => ['rgb' => '1E40AF'], // Navy Blue - elegant
- ],
- 'alignment' => [
- 'horizontal' => Alignment::HORIZONTAL_CENTER,
- 'vertical' => Alignment::VERTICAL_CENTER,
- ],
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- ];
-
- // Data rows style
- $dataStyle = [
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- 'alignment' => [
- 'vertical' => Alignment::VERTICAL_TOP,
- 'horizontal' => Alignment::HORIZONTAL_LEFT,
- 'indent' => 1, // Add padding
- ],
- ];
-
- // Currency columns style (format currency)
- $currencyStyle = [
- 'numberFormat' => [
- 'formatCode' => '"Rp" #,##0',
- ],
- ];
-
- return [
- // Header styling
- 1 => $headerStyle,
-
- // Data rows styling
- 'A2:'.$lastColumn.$lastRow => $dataStyle,
-
- // Currency columns styling
- 'E2:E'.$lastRow => $currencyStyle,
- ];
- }
-
- public function registerEvents(): array
- {
- return [
- AfterSheet::class => function (AfterSheet $event) {
- // Auto-size columns with max width
- foreach (range('A', 'K') as $column) {
- $event->sheet->getColumnDimension($column)->setAutoSize(true);
- }
-
- // Set row height for header
- $event->sheet->getRowDimension(1)->setRowHeight(25);
- },
- ];
- }
-}
diff --git a/app/Exports/ProductExport.php b/app/Exports/ProductExport.php
deleted file mode 100644
index 1a8d543..0000000
--- a/app/Exports/ProductExport.php
+++ /dev/null
@@ -1,153 +0,0 @@
-name,
- $product->sku,
- $product->sale_price,
- strip_tags($product->description) ?: '-',
- formatDateLocalized($product->created_at, 'd/m/Y H:i'),
- formatDateLocalized($product->updated_at, 'd/m/Y H:i'),
- ];
- }
-
- public function columnWidths(): array
- {
- return [
- 'A' => 28, // Product Name
- 'B' => 18, // SKU
- 'C' => 18, // Sale Price
- 'D' => 35, // Description
- 'E' => 21, // Created Date
- 'F' => 21, // Updated Date
- ];
- }
-
- /**
- * @return array
- */
- public function styles(Worksheet $sheet)
- {
- $lastRow = $sheet->getHighestRow();
- $lastColumn = $sheet->getHighestColumn();
-
- // Header style
- $headerStyle = [
- 'font' => [
- 'bold' => true,
- 'size' => 12,
- 'color' => ['rgb' => 'FFFFFF'],
- ],
- 'fill' => [
- 'fillType' => Fill::FILL_SOLID,
- 'startColor' => ['rgb' => '0F766E'], // Teal - elegant
- ],
- 'alignment' => [
- 'horizontal' => Alignment::HORIZONTAL_CENTER,
- 'vertical' => Alignment::VERTICAL_CENTER,
- ],
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- ];
-
- // Data rows style
- $dataStyle = [
- 'borders' => [
- 'allBorders' => [
- 'borderStyle' => Border::BORDER_THIN,
- 'color' => ['rgb' => '000000'],
- ],
- ],
- 'alignment' => [
- 'vertical' => Alignment::VERTICAL_TOP,
- 'horizontal' => Alignment::HORIZONTAL_LEFT,
- 'indent' => 1, // Add padding
- ],
- ];
-
- // Currency columns style (format currency)
- $currencyStyle = [
- 'numberFormat' => [
- 'formatCode' => '"Rp" #,##0',
- ],
- ];
-
- return [
- // Header styling
- 1 => $headerStyle,
-
- // Data rows styling
- 'A2:'.$lastColumn.$lastRow => $dataStyle,
-
- // Currency columns styling
- 'C2:C'.$lastRow => $currencyStyle,
- ];
- }
-
- public function registerEvents(): array
- {
- return [
- AfterSheet::class => function (AfterSheet $event) {
- // Auto-size columns with max width
- foreach (range('A', 'F') as $column) {
- $event->sheet->getColumnDimension($column)->setAutoSize(true);
- }
-
- // Set row height for header
- $event->sheet->getRowDimension(1)->setRowHeight(25);
- },
- ];
- }
-}
diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php
deleted file mode 100644
index b005074..0000000
--- a/app/Http/Controllers/ExportController.php
+++ /dev/null
@@ -1,57 +0,0 @@
-format('Y-m-d_H-i-s').'.xlsx'
- );
- }
-
- /**
- * Export products to Excel
- */
- public function products(): BinaryFileResponse
- {
- return Excel::download(
- new ProductExport,
- 'data_produk_botol_'.now()->format('Y-m-d_H-i-s').'.xlsx'
- );
- }
-
- /**
- * Export formulas to Excel
- */
- public function formulas(): BinaryFileResponse
- {
- return Excel::download(
- new FormulaExport,
- 'data_rumus_'.now()->format('Y-m-d_H-i-s').'.xlsx'
- );
- }
-
- /**
- * Export brands to Excel
- */
- public function brands(): BinaryFileResponse
- {
- return Excel::download(
- new BrandExport,
- 'data_merek_'.now()->format('Y-m-d_H-i-s').'.xlsx'
- );
- }
-}
diff --git a/resources/views/livewire/studio/catalog/brands.blade.php b/resources/views/livewire/studio/catalog/brands.blade.php
index 29a3034..27ee058 100644
--- a/resources/views/livewire/studio/catalog/brands.blade.php
+++ b/resources/views/livewire/studio/catalog/brands.blade.php
@@ -4,13 +4,6 @@