fix: update photo handling logic in OrderRequest to check for S3 keys instead of file uploads, improving validation for media management
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
Yoga Pangestu 2026-07-03 15:07:53 +07:00
parent 64a678890e
commit 4ba6b9da9f

View File

@ -123,7 +123,7 @@ public function withValidator(Validator $validator): void
$hasExistingPhotos = $order->hasMedia('photos');
}
$hasNewPhotos = $this->hasFile('photos');
$hasNewPhotos = ! empty($this->input('s3_keys'));
$isRemovingAll = ! empty($this->input('remove_media_ids')) && $hasExistingPhotos;
if (! $hasExistingPhotos && ! $hasNewPhotos) {