diff --git a/app/Http/Controllers/ESign/EsignApiController.php b/app/Http/Controllers/ESign/EsignApiController.php
index 49b387fa..738fb863 100644
--- a/app/Http/Controllers/ESign/EsignApiController.php
+++ b/app/Http/Controllers/ESign/EsignApiController.php
@@ -843,12 +843,15 @@ public function remind(Request $request, int $id): JsonResponse
->orderBy('sign_order')
->first();
+ // 요청에서 발송 방식 지정이 있으면 우선 사용, 없으면 계약 저장값, 최종 기본값은 email
+ $sendMethod = $request->input('send_method') ?: ($contract->send_method ?? 'email');
+
$notificationResults = [];
if ($nextSigner) {
$nextSigner->update(['status' => 'notified']);
$results = $this->dispatchNotification(
$contract, $nextSigner,
- $contract->send_method ?? 'email',
+ $sendMethod,
$contract->sms_fallback ?? true,
isReminder: true,
);
diff --git a/resources/views/esign/detail.blade.php b/resources/views/esign/detail.blade.php
index cca161ba..d6c099cf 100644
--- a/resources/views/esign/detail.blade.php
+++ b/resources/views/esign/detail.blade.php
@@ -75,6 +75,8 @@
const [contract, setContract] = useState(null);
const [loading, setLoading] = useState(true);
const [actionLoading, setActionLoading] = useState('');
+ const [showRemindModal, setShowRemindModal] = useState(false);
+ const [remindMethod, setRemindMethod] = useState('email');
const fetchContract = useCallback(async () => {
try {
@@ -87,12 +89,14 @@
useEffect(() => { fetchContract(); }, [fetchContract]);
- const doAction = async (action, confirm_msg) => {
+ const doAction = async (action, confirm_msg, body = {}) => {
if (confirm_msg && !window.confirm(confirm_msg)) return;
setActionLoading(action);
try {
const res = await fetch(`/esign/contracts/${CONTRACT_ID}/${action}`, {
- method: 'POST', headers: getHeaders(),
+ method: 'POST',
+ headers: { ...getHeaders(), 'Content-Type': 'application/json' },
+ body: JSON.stringify(body),
});
const json = await res.json();
if (json.success) fetchContract();
@@ -101,6 +105,11 @@
setActionLoading('');
};
+ const handleRemind = () => {
+ setShowRemindModal(false);
+ doAction('remind', null, { send_method: remindMethod });
+ };
+
if (loading) return
로딩 중...
;
if (!contract) return 계약을 찾을 수 없습니다.
;
@@ -249,17 +258,18 @@ className="w-8 h-8 flex items-center justify-center rounded-lg text-gray-400 hov
서명 위치 설정
-
+
+ 서명 요청 발송
+
>
)}
{['pending', 'partially_signed'].includes(c.status) && (
-
+ <>
+
+ >
)}
{!['completed', 'cancelled', 'rejected'].includes(c.status) && (