- Added `media-library.php` configuration file for managing media uploads and conversions. - Updated `filesystems.php` to set default visibility for AWS S3 storage. - Implemented `FileUpload` component for handling file uploads with preview and error handling. - Created `ImagePreviewModal` component for displaying image previews in a modal. - Introduced `Attachment` UI components for better file attachment handling. - Added `useFileUpload` hook to manage file upload state and logic. - Implemented utility functions for uploading files to S3 with presigned URLs. - Created API route for generating presigned URLs for file uploads.
32 lines
789 B
PHP
32 lines
789 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum Modules: string
|
|
{
|
|
case PRODUCT = 'product';
|
|
case EMPLOYEE = 'employee';
|
|
case ORDER = 'order';
|
|
case PURCHASE = 'purchase';
|
|
case RAW_MATERIAL = 'raw_material';
|
|
case EXPENSE = 'expense';
|
|
case USER = 'user';
|
|
case HOMEPAGE = 'homepage';
|
|
case OTHER = 'other';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::PRODUCT => 'Produk',
|
|
self::EMPLOYEE => 'Karyawan',
|
|
self::ORDER => 'Pesanan',
|
|
self::PURCHASE => 'Pembelian',
|
|
self::RAW_MATERIAL => 'Bahan Baku',
|
|
self::EXPENSE => 'Pengeluaran',
|
|
self::USER => 'Pengguna',
|
|
self::HOMEPAGE => 'Homepage',
|
|
self::OTHER => 'Lainnya',
|
|
};
|
|
}
|
|
}
|