package com.ffii.fpsms.modules.jobOrder.service

import com.ffii.fpsms.modules.master.web.models.MessageResponse
import com.ffii.fpsms.modules.jobOrder.web.model.JobOrderCommonActionRequest
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional

/**
 * Job Order Workbench release: deferred stock out / SPL / SOL until first workbench assign.
 * Normal release remains on [JobOrderService.releaseJobOrder] via `/jo/release`.
 */
@Service
open class JoWorkbenchReleaseService(
    private val jobOrderService: JobOrderService,
) {

    @Transactional
    open fun releaseJobOrderForWorkbench(request: JobOrderCommonActionRequest): MessageResponse {
        return jobOrderService.releaseJobOrderForWorkbench(request)
    }
}
