refactor: standardize attribute labels across various request files for consistency and clarity

This commit is contained in:
Yoga Pangestu 2026-07-05 22:04:57 +07:00
parent 765b97519c
commit c222be62d3
25 changed files with 131 additions and 131 deletions

View File

@ -28,7 +28,7 @@ public function rules(): array
public function attributes(): array
{
return [
'appearance' => 'Tampilan',
'appearance' => 'tampilan',
];
}
}

View File

@ -29,9 +29,9 @@ public function rules(): array
public function attributes(): array
{
return [
'current_password' => 'Kata Sandi Saat Ini',
'password' => 'Kata Sandi Baru',
'password_confirmation' => 'Konfirmasi Kata Sandi Baru',
'current_password' => 'kata sandi saat ini',
'password' => 'kata sandi baru',
'password_confirmation' => 'konfirmasi kata sandi baru',
];
}
}

View File

@ -25,7 +25,7 @@ public function rules(): array
public function attributes(): array
{
return [
'amount' => 'Jumlah Pembayaran',
'amount' => 'jumlah pembayaran',
];
}
}

View File

@ -58,18 +58,18 @@ public function rules(): array
public function attributes(): array
{
return [
'email' => 'Email',
'username' => 'Username',
'full_name' => 'Nama Lengkap',
'phone_number' => 'Nomor Telepon',
'gender' => 'Jenis Kelamin',
'birth_date' => 'Tanggal Lahir',
'address' => 'Alamat',
'profile_photo' => 'Foto Profil',
'role' => 'Role',
'join_date' => 'Tanggal Bergabung',
'employment_status' => 'Status Kepegawaian',
'base_salary' => 'Gaji Pokok',
'email' => 'email',
'username' => 'username',
'full_name' => 'nama lengkap',
'phone_number' => 'nomor telepon',
'gender' => 'jenis kelamin',
'birth_date' => 'tanggal lahir',
'address' => 'alamat',
'profile_photo' => 'foto profil',
'role' => 'role',
'join_date' => 'tanggal bergabung',
'employment_status' => 'status kepegawaian',
'base_salary' => 'gaji pokok',
];
}
}

View File

@ -28,7 +28,7 @@ public function rules(): array
public function attributes(): array
{
return [
'reason' => 'Alasan Penolakan',
'reason' => 'alasan penolakan',
];
}
}

View File

@ -50,8 +50,8 @@ public function rules(): array
public function attributes(): array
{
return [
'start_date' => 'Tanggal Mulai',
'end_date' => 'Tanggal Selesai',
'start_date' => 'tanggal mulai',
'end_date' => 'tanggal selesai',
];
}
}

View File

@ -71,21 +71,21 @@ public function attributes(): array
{
return array_merge(
[
'description' => 'Keterangan',
'materials' => 'Bahan Baku',
'materials.*.raw_material_price_id' => 'Varian',
'materials.*.material_usage' => 'Pemakaian',
'materials.*.material_result' => 'Hasil',
'materials.*.combination_material_result' => 'Hasil Kombinasi',
'results' => 'Hasil Produk',
'results.*.product_variant_id' => 'Varian Produk',
'results.*.cutting_result' => 'Hasil',
'results.*.sample' => 'Sample',
'results.*.original_outside_sample' => 'Diluar Sample',
'sewing_cost' => 'Jasa Jahit',
'other_cost' => 'Biaya Lainnya',
'description' => 'keterangan',
'materials' => 'bahan baku',
'materials.*.raw_material_price_id' => 'varian',
'materials.*.material_usage' => 'pemakaian',
'materials.*.material_result' => 'hasil',
'materials.*.combination_material_result' => 'hasil kombinasi',
'results' => 'hasil produk',
'results.*.product_variant_id' => 'varian produk',
'results.*.cutting_result' => 'hasil',
'results.*.sample' => 'sample',
'results.*.original_outside_sample' => 'diluar sample',
'sewing_cost' => 'jasa jahit',
'other_cost' => 'biaya lainnya',
],
$this->photoUploadAttributes('Foto Cutting'),
$this->photoUploadAttributes('foto cutting'),
);
}
}

View File

@ -63,9 +63,9 @@ public function rules(): array
public function attributes(): array
{
return [
'status' => 'Status',
'reason' => 'Alasan Penolakan',
'verification_note' => 'Catatan Verifikasi',
'status' => 'status',
'reason' => 'alasan penolakan',
'verification_note' => 'catatan verifikasi',
];
}

View File

@ -68,23 +68,23 @@ public function rules(): array
public function attributes(): array
{
return [
'customer_id' => 'Pelanggan',
'marketing_id' => 'Marketing',
'channel' => 'Channel',
'price_type' => 'Tipe Harga',
'payment_type' => 'Tipe Pembayaran',
'is_affiliate' => 'Pesanan Afiliasi',
'tiktok_order_id' => 'ID Pesanan TikTok Shop',
'shopee_order_id' => 'ID Pesanan Shopee',
'discount' => 'Diskon',
'nego_price' => 'Harga Nego',
'notes' => 'Keterangan',
'status' => 'Status Pesanan',
'items' => 'Produk',
'items.*.product_variant_id' => 'Varian Produk',
'items.*.quantity' => 'Jumlah',
'items.*.stock_quality' => 'Kualitas Stok',
...$this->photoUploadAttributes('Bukti Transaksi'),
'customer_id' => 'pelanggan',
'marketing_id' => 'marketing',
'channel' => 'channel',
'price_type' => 'tipe harga',
'payment_type' => 'tipe pembayaran',
'is_affiliate' => 'pesanan afiliasi',
'tiktok_order_id' => 'id pesanan tiktok shop',
'shopee_order_id' => 'id pesanan shopee',
'discount' => 'diskon',
'nego_price' => 'harga nego',
'notes' => 'keterangan',
'status' => 'status pesanan',
'items' => 'produk',
'items.*.product_variant_id' => 'varian produk',
'items.*.quantity' => 'jumlah',
'items.*.stock_quality' => 'kualitas stok',
...$this->photoUploadAttributes('bukti transaksi'),
];
}

View File

@ -43,7 +43,7 @@ public function rules(): array
public function attributes(): array
{
return [
'status' => 'Status',
'status' => 'status',
];
}

View File

@ -40,11 +40,11 @@ public function rules(): array
public function attributes(): array
{
return [
'raw_material_id' => 'Bahan Baku',
'variant' => 'Nama Varian',
'price' => 'Harga',
'stock' => 'Stok',
...$this->photoUploadAttributes('Foto Varian'),
'raw_material_id' => 'bahan baku',
'variant' => 'nama varian',
'price' => 'harga',
'stock' => 'stok',
...$this->photoUploadAttributes('foto varian'),
];
}
}

View File

@ -52,14 +52,14 @@ public function rules(): array
public function attributes(): array
{
return [
'supplier_id' => 'Supplier',
'discount' => 'Diskon',
'shipping_cost' => 'Ongkir',
'notes' => 'Keterangan',
'items' => 'Bahan Baku',
'items.*.raw_material_price_id' => 'Bahan Baku',
'items.*.quantity' => 'Jumlah',
...$this->photoUploadAttributes('Bukti Transaksi'),
'supplier_id' => 'supplier',
'discount' => 'diskon',
'shipping_cost' => 'ongkir',
'notes' => 'keterangan',
'items' => 'bahan baku',
'items.*.raw_material_price_id' => 'bahan baku',
'items.*.quantity' => 'jumlah',
...$this->photoUploadAttributes('bukti transaksi'),
];
}
}

View File

@ -35,9 +35,9 @@ public function rules(): array
public function attributes(): array
{
return [
'product_variant_id' => 'Varian Produk',
'quantity' => 'Jumlah',
'notes' => 'Catatan',
'product_variant_id' => 'varian produk',
'quantity' => 'jumlah',
'notes' => 'catatan',
];
}
}

View File

@ -42,16 +42,16 @@ public function rules(): array
public function attributes(): array
{
return [
'verification_note' => 'Catatan Verifikasi',
'result_prices' => 'Harga Jual',
'result_prices.*.product_variant_id' => 'Varian Produk',
'result_prices.*.prices' => 'Harga Jual',
'result_prices.*.prices.*.type' => 'Tipe Harga',
'result_prices.*.prices.*.price' => 'Harga Jual',
'results' => 'Hasil Cutting',
'results.*.product_variant_id' => 'Varian Produk',
'results.*.good' => 'Bagus',
'results.*.reject' => 'Reject',
'verification_note' => 'catatan verifikasi',
'result_prices' => 'harga jual',
'result_prices.*.product_variant_id' => 'varian produk',
'result_prices.*.prices' => 'harga jual',
'result_prices.*.prices.*.type' => 'tipe harga',
'result_prices.*.prices.*.price' => 'harga jual',
'results' => 'hasil cutting',
'results.*.product_variant_id' => 'varian produk',
'results.*.good' => 'bagus',
'results.*.reject' => 'reject',
];
}

View File

@ -45,13 +45,13 @@ public function messages(): array
public function attributes(): array
{
return [
'opname_date' => 'Tanggal Opname',
'notes' => 'Catatan',
'items' => 'Item Stok Opname',
'items.*.product_variant_id' => 'Varian Produk',
'items.*.physical_stock' => 'Stok Fisik',
'items.*.stock_quality' => 'Kualitas',
'items.*.notes' => 'Catatan',
'opname_date' => 'tanggal opname',
'notes' => 'catatan',
'items' => 'item stok opname',
'items.*.product_variant_id' => 'varian produk',
'items.*.physical_stock' => 'stok fisik',
'items.*.stock_quality' => 'kualitas',
'items.*.notes' => 'catatan',
];
}
}

View File

@ -32,7 +32,7 @@ public function rules(): array
public function attributes(): array
{
return [
'name' => 'Nama',
'name' => 'nama',
];
}
}

View File

@ -35,9 +35,9 @@ public function rules(): array
public function attributes(): array
{
return [
'name' => 'Nama',
'phone_number' => 'Nomor Telepon',
'address' => 'Alamat',
'name' => 'nama',
'phone_number' => 'nomor telepon',
'address' => 'alamat',
];
}
}

View File

@ -42,10 +42,10 @@ public function rules(): array
public function attributes(): array
{
return [
'name' => 'Nama Produk',
'description' => 'Deskripsi',
'category_ids' => 'Kategori',
'category_ids.*' => 'Kategori',
'name' => 'nama produk',
'description' => 'deskripsi',
'category_ids' => 'kategori',
'category_ids.*' => 'kategori',
...$this->productVariantAttributes(),
];
}

View File

@ -40,8 +40,8 @@ public function rules(): array
public function attributes(): array
{
return [
'name' => 'Nama Bahan Baku',
'unit' => 'Satuan',
'name' => 'nama bahan baku',
'unit' => 'satuan',
...$this->rawMaterialPriceAttributes(),
];
}

View File

@ -35,9 +35,9 @@ public function rules(): array
public function attributes(): array
{
return [
'name' => 'Nama',
'phone_number' => 'Nomor Telepon',
'address' => 'Alamat',
'name' => 'nama',
'phone_number' => 'nomor telepon',
'address' => 'alamat',
];
}
}

View File

@ -37,12 +37,12 @@ public function rules(): array
public function attributes(): array
{
return [
'hero_image' => 'Foto Hero',
'hero_image_s3_key' => 'Foto Hero',
'about_image' => 'Foto Tentang Kami',
'about_image_s3_key' => 'Foto Tentang Kami',
'gallery_s3_keys' => 'Koleksi Lookbook',
'gallery_s3_keys.*' => 'Koleksi Lookbook',
'hero_image' => 'foto hero',
'hero_image_s3_key' => 'foto hero',
'about_image' => 'foto tentang kami',
'about_image_s3_key' => 'foto tentang kami',
'gallery_s3_keys' => 'koleksi lookbook',
'gallery_s3_keys.*' => 'koleksi lookbook',
];
}
}

View File

@ -30,9 +30,9 @@ public function rules(): array
public function attributes(): array
{
return [
'instagram_url' => 'Instagram',
'facebook_url' => 'Facebook',
'tiktok_url' => 'TikTok',
'instagram_url' => 'instagram',
'facebook_url' => 'facebook',
'tiktok_url' => 'tiktok',
];
}
}

View File

@ -33,8 +33,8 @@ public function rules(): array
public function attributes(): array
{
return [
'login' => 'Email/Username',
'password' => 'Kata Sandi',
'login' => 'email/username',
'password' => 'kata sandi',
];
}

View File

@ -59,20 +59,20 @@ protected function productVariantRules(string $variantsKey = 'variants', ?int $p
protected function productVariantAttributes(string $variantsKey = 'variants'): array
{
return [
$variantsKey => 'Varian',
"{$variantsKey}.*.name" => 'Nama Varian',
"{$variantsKey}.*.stock" => 'Stok',
"{$variantsKey}.*.retail_stock" => 'Stok Ecer',
"{$variantsKey}.*.prices" => 'Harga',
"{$variantsKey}.*.prices.distributor" => 'Distributor',
"{$variantsKey}.*.prices.agent" => 'Agen',
"{$variantsKey}.*.prices.sub_agent" => 'Sub Agen',
"{$variantsKey}.*.prices.grosir" => 'Grosir',
"{$variantsKey}.*.prices.retail" => 'Eceran',
"{$variantsKey}.*.prices.tiktok" => 'TikTok',
"{$variantsKey}.*.prices.shopee" => 'Shopee',
"{$variantsKey}.*.prices.harga_modal" => 'Harga Modal',
...$this->variantImageAttributes($variantsKey, 'Foto Varian'),
$variantsKey => 'varian',
"{$variantsKey}.*.name" => 'nama varian',
"{$variantsKey}.*.stock" => 'stok',
"{$variantsKey}.*.retail_stock" => 'stok ecer',
"{$variantsKey}.*.prices" => 'harga',
"{$variantsKey}.*.prices.distributor" => 'distributor',
"{$variantsKey}.*.prices.agent" => 'agen',
"{$variantsKey}.*.prices.sub_agent" => 'sub agen',
"{$variantsKey}.*.prices.grosir" => 'grosir',
"{$variantsKey}.*.prices.retail" => 'eceran',
"{$variantsKey}.*.prices.tiktok" => 'tiktok',
"{$variantsKey}.*.prices.shopee" => 'shopee',
"{$variantsKey}.*.prices.harga_modal" => 'harga modal',
...$this->variantImageAttributes($variantsKey, 'foto varian'),
];
}
}

View File

@ -40,11 +40,11 @@ protected function rawMaterialPriceRules(string $pricesKey = 'prices', ?int $raw
protected function rawMaterialPriceAttributes(string $pricesKey = 'prices'): array
{
return [
$pricesKey => 'Varian',
"{$pricesKey}.*.variant" => 'Nama Varian',
"{$pricesKey}.*.price" => 'Harga',
"{$pricesKey}.*.stock" => 'Stok',
...$this->variantImageAttributes($pricesKey, 'Foto Varian'),
$pricesKey => 'varian',
"{$pricesKey}.*.variant" => 'nama varian',
"{$pricesKey}.*.price" => 'harga',
"{$pricesKey}.*.stock" => 'stok',
...$this->variantImageAttributes($pricesKey, 'foto varian'),
];
}
}