• Explore
      Courses Batches Statistics Jobs
  • Login
Job Cards Dashboard

Job Cards Dashboard

Job Card Details

Basic Information

Job Card N/A
QN ID N/A
Status N/A
Operation N/A
Customer N/A
Workstation N/A

Item Information

Item Name N/A
For Quantity
Completed Quantity 0

Date & Time Information

Actual Start Date N/A
Actual End Date N/A
Time (mins) 0
End Date N/A

Document Information

Document Status Draft
Is Submitted No

Complete Job

// ---------- Configuration ---------- // API endpoints - change if your actual method path differs const JOBCARD_LIST_METHOD = "jct"; // user said api method: jct // Using frappe client calls // ---------- Utilities ---------- // ---------- App state ---------- let jobcards = []; // array of job card objects returned by jct const runningTimers = {}; // map job_card_name -> interval id // ---------- Fetch list ---------- // show loading // call custom method // ---------- Render UI ---------- stopAllTimers(); // clear timers before re-rendering // calculate initial timer base: // if actual_start_date present and status not Completed -> running // Render action buttons // If currently running, start timer // allowed actions only for not finished // Determine if currently running // ---------- Timer logic ---------- // create an interval that updates the timer display every second // clear existing // ---------- Actions (Start / Pause / Resume / Stop) ---------- // Helper: load jobcard doc from server // Helper: set fields on job card (uses set_value) // get doc // If already started, keep existing actual_start_date; else set it. // clear actual_end_date // refresh client state // nothing to pause — just set On Hold // compute elapsed between actual_start_date and now // update doc: add to total_time_in_mins, clear actual_start_date, set status // set actual_start_date to now and status to In Progress // set status Completed, set actual_end_date, update total_time_in_mins, clear actual_start_date // ---------- UI Events ---------- // initial fetch // cleanup when unload -->
Powered by ERPNext