@@ -34,6 +34,7 @@ const form = reactive({
3434
3535const errors = ref <Record <string , string >>({})
3636const isSubmitting = ref (false )
37+ const isMoving = ref (false )
3738const sendInvitationAfter = ref (false )
3839
3940// ─── Email templates ──────────────────────────────────────────────
@@ -256,6 +257,24 @@ async function handleSubmit() {
256257 isSubmitting .value = false
257258 }
258259}
260+
261+ // ─── Move to interview stage (no scheduling) ──────────────────────
262+ async function handleMoveToInterview() {
263+ isMoving .value = true
264+ errors .value = {}
265+ try {
266+ await $fetch (` /api/applications/${props .applicationId } ` , {
267+ method: ' PATCH' ,
268+ body: { status: ' interview' },
269+ })
270+ await refreshNuxtData (' interviews' )
271+ emit (' scheduled' )
272+ } catch (err : any ) {
273+ errors .value .submit = err ?.data ?.statusMessage ?? ' Failed to move to interview stage'
274+ } finally {
275+ isMoving .value = false
276+ }
277+ }
259278 </script >
260279
261280<template >
@@ -637,19 +656,30 @@ async function handleSubmit() {
637656 <button
638657 type =" button"
639658 class =" flex-1 rounded-xl border border-surface-200 dark:border-surface-700 px-4 py-2.5 text-sm font-medium text-surface-600 dark:text-surface-400 hover:text-surface-800 hover:bg-surface-50 dark:hover:text-surface-200 dark:hover:bg-surface-800 transition-colors cursor-pointer"
659+ :disabled =" isSubmitting || isMoving"
640660 @click =" emit('close')"
641661 >
642662 Cancel
643663 </button >
644664 <button
645665 type =" button"
646- :disabled =" isSubmitting"
666+ :disabled =" isSubmitting || isMoving "
647667 class =" flex-[1.5] rounded-xl bg-brand-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors cursor-pointer shadow-sm shadow-brand-600/20 dark:shadow-brand-500/10"
648668 @click =" handleSubmit"
649669 >
650670 {{ isSubmitting ? 'Scheduling…' : 'Schedule Interview' }}
651671 </button >
652672 </div >
673+ <div class =" mt-2.5 text-center" >
674+ <button
675+ type =" button"
676+ :disabled =" isSubmitting || isMoving"
677+ class =" text-[12px] text-surface-400 hover:text-surface-600 dark:text-surface-500 dark:hover:text-surface-300 underline underline-offset-2 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"
678+ @click =" handleMoveToInterview"
679+ >
680+ {{ isMoving ? 'Moving…' : 'Skip scheduling — just move to interview stage' }}
681+ </button >
682+ </div >
653683 </div >
654684 </div >
655685 </Transition >
0 commit comments