Compare commits

..

No commits in common. "7c15a39bbd0a6275e4e6653f55320ee575b246f1" and "765b97519c9d81b38a00d058ce51db4ab90bed6b" have entirely different histories.

26 changed files with 144 additions and 135 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -71,21 +71,21 @@ public function attributes(): array
{ {
return array_merge( return array_merge(
[ [
'description' => 'keterangan', 'description' => 'Keterangan',
'materials' => 'bahan baku', 'materials' => 'Bahan Baku',
'materials.*.raw_material_price_id' => 'varian', 'materials.*.raw_material_price_id' => 'Varian',
'materials.*.material_usage' => 'pemakaian', 'materials.*.material_usage' => 'Pemakaian',
'materials.*.material_result' => 'hasil', 'materials.*.material_result' => 'Hasil',
'materials.*.combination_material_result' => 'hasil kombinasi', 'materials.*.combination_material_result' => 'Hasil Kombinasi',
'results' => 'hasil produk', 'results' => 'Hasil Produk',
'results.*.product_variant_id' => 'varian produk', 'results.*.product_variant_id' => 'Varian Produk',
'results.*.cutting_result' => 'hasil', 'results.*.cutting_result' => 'Hasil',
'results.*.sample' => 'sample', 'results.*.sample' => 'Sample',
'results.*.original_outside_sample' => 'diluar sample', 'results.*.original_outside_sample' => 'Diluar Sample',
'sewing_cost' => 'jasa jahit', 'sewing_cost' => 'Jasa Jahit',
'other_cost' => 'biaya lainnya', '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 public function attributes(): array
{ {
return [ return [
'status' => 'status', 'status' => 'Status',
'reason' => 'alasan penolakan', 'reason' => 'Alasan Penolakan',
'verification_note' => 'catatan verifikasi', 'verification_note' => 'Catatan Verifikasi',
]; ];
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -37,17 +37,26 @@ const whatsappText = computed(() => {
} }
if (c.results?.length) { if (c.results?.length) {
const productNames = new Set<string>(); const groups: Record<string, { name: string; items: typeof c.results }> = {};
c.results.forEach((result) => { c.results.forEach((result) => {
const productName = result.product_variant?.product?.name ?? 'Produk Tidak Diketahui'; const productName = result.product_variant?.product?.name ?? 'Produk Tidak Diketahui';
productNames.add(productName);
if (!groups[productName]) {
groups[productName] = { name: productName, items: [] };
}
groups[productName].items.push(result);
}); });
text += `\n*Hasil Produk:*\n`; text += `\n*Hasil Produk:*\n`;
Array.from(productNames).forEach((name, index) => { Object.values(groups).forEach((group, index) => {
text += `${index + 1}. ${name}\n`; text += `${index + 1}. ${group.name}\n`;
group.items.forEach((item) => {
text += ` - ${item.product_variant?.name ?? '-'}\n`;
});
}); });
} }