fix: 允许已确认订单再次交付成片
This commit is contained in:
@@ -314,7 +314,7 @@ final class DroneShootingOrderCardView: UIView {
|
||||
private func applyRemoteActions(order: DroneDockHomeOrder, identifier: String) {
|
||||
let canShoot = order.activeTaskID != nil || order.canCreateTask == true
|
||||
let canConfirm = order.canInviteVisitorConfirmation
|
||||
let canDeliver = order.canUploadFilm == true
|
||||
let canDeliver = order.canDeliverFilm
|
||||
primaryButton.isHidden = !canShoot && !canConfirm && !canDeliver
|
||||
primaryButton.isEnabled = !primaryButton.isHidden
|
||||
primaryButton.backgroundColor = DroneDockStyle.primary
|
||||
@@ -398,7 +398,7 @@ final class DroneShootingOrderCardView: UIView {
|
||||
|
||||
@objc private func secondaryTapped() {
|
||||
if let order = displayedHomeOrder {
|
||||
guard !secondaryButton.isHidden, secondaryButton.isEnabled, order.canUploadFilm == true else { return }
|
||||
guard !secondaryButton.isHidden, secondaryButton.isEnabled, order.canDeliverFilm else { return }
|
||||
onDeliveryTap?()
|
||||
return
|
||||
}
|
||||
@@ -415,7 +415,7 @@ final class DroneShootingOrderCardView: UIView {
|
||||
guard !primaryButton.isHidden, primaryButton.isEnabled else { return }
|
||||
if order.activeTaskID != nil || order.canCreateTask == true { onShootingTap?() }
|
||||
else if order.canInviteVisitorConfirmation { onConfirmationTap?() }
|
||||
else if order.canUploadFilm == true { onDeliveryTap?() }
|
||||
else if order.canDeliverFilm { onDeliveryTap?() }
|
||||
return
|
||||
}
|
||||
guard let displayedOrder else { return }
|
||||
|
||||
Reference in New Issue
Block a user