{{ mode === 'work_order' ? work_order : workstation }}
{{ summary.active_count }}{% if (mode === 'workstation' && summary.capacity > 1) { %}
/{{ summary.capacity }}
{% } %}
{{ __("Active") }}
{{ summary.queue_count }}
{{ mode === 'work_order' ? __("Pending") : __("In Queue") }}
{{ summary.completed_count }}
{{ __("Completed") }}
{% if (mode === 'workstation' && oee) { %}
OEE {{ oee.oee !== null && oee.oee !== undefined ? oee.oee + '%' : '–' }}
· {{ oee.availability !== null && oee.availability !== undefined ? 'A ' + oee.availability : 'A –' }} · P {{ oee.performance }} · Q {{ oee.quality }}
{% } %}
{% if (slots.length > 0) { %}
{% slots.forEach((slot) => { %}
{% if (slot && slot._is_next_up) { %}
{% if (slot.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(slot.finished_good || slot.production_item, 2) }}
{% } %}
{{ slot.finished_good || slot.production_item }}
{% if (slot.is_subcontracted) { %}
{{ __("Subcontract") }}
{% } %}
{{ slot.name }}
{{ slot.operation }} · {{ format_number(slot.for_quantity, null, 0) }} {{ slot.fg_uom || '' }} {% if (slot.work_order) { %} · {{ slot.work_order }}{% } %}
{% if (slot._materials_ready) { %}
{{ __("Start Job") }} →
{% } else { %}
{{ __("Transfer Materials") }}
{% } %}
{% } else if (slot) { %}
{% if (slot.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(slot.finished_good || slot.production_item, 2) }}
{% } %}
{{ slot.finished_good || slot.production_item }}
{{ slot.name }}
{{ __(slot.status) }}
{% if (slot.is_subcontracted) { %}
{{ __("Subcontract") }}
{% } %} {% if (slot.qc && slot.qc.status === 'Accepted') { %}
{{ __("QC Passed") }}
{% } else if (slot.qc && slot.qc.status === 'Rejected') { %}
{{ __("QC Rejected") }}
{% } else if (slot.qc && slot.qc.required) { %}
{{ __("QC Required") }}
{% } else if (slot.qc && slot.qc.has_checklist) { %}
{{ __("QC Available") }}
{% } %}
{{ slot.operation }} · {{ format_number(slot.total_completed_qty, null, 0) }}/{{ format_number(slot.for_quantity, null, 0) }} {{ slot.fg_uom || '' }} {% if (slot.work_order) { %} ·
{{ slot.work_order }}
{% } %}
00
:
00
:
00
{% if (slot.is_paused) { %}
{{ __("Resume Job") }}
{% } else { %}
{{ __("Pause") }}
{{ __("End Session") }}
{% } %}
{% } else { %}
{{ __("Slot available — start a job from the queue.") }}
{% } %} {% if (slot && slot.materials && slot.materials.length > 0) { %} {% var ready_n = slot.materials.filter((x) => x.status === 'ready').length; %} {% var avail_n = slot.materials.filter((x) => x.status === 'available').length; %} {% var short_n = slot.materials.filter((x) => x.status === 'short').length; %}
{{ frappe.utils.icon("es-line-down", "sm") }}
{{ __("Materials") }}
{{ slot.materials.length }}
{% if (ready_n > 0) { %}
{% } %} {% if (avail_n > 0) { %}
{% } %} {% if (short_n > 0) { %}
{% } %}
{% if (slot.make_material_request && !slot._is_next_up) { %}
{{ __("Transfer Materials") }}
{% } %}
{% slot.materials.forEach((m) => { %} {% var color = m.status === 'ready' ? 'green' : (m.status === 'available' ? 'yellow' : 'red'); %} {% var label = m.status === 'ready' ? __('Ready') : (m.status === 'available' ? __('Available') : __('Short')); %}
{{ m.item_name }}
{{ m.item_code }}{% if (m.source_warehouse) { %} · {{ m.source_warehouse }}{% } %}
{{ format_number(m.transferred_qty, null, 2) }} / {{ format_number(m.required_qty, null, 2) }} {{ m.uom }}
{% if (m.status !== 'ready') { %}
{{ __("In source") }}: {{ format_number(m.on_hand_qty, null, 2) }}
{% } %}
{{ label }}
{% }); %}
{% } %} {% if (slot && slot.instructions) { %}
{{ frappe.utils.icon("es-line-down", "sm") }}
{{ __("Work Instructions") }}
{% if (slot.instructions.description) { %}
{{ frappe.utils.escape_html(slot.instructions.description) }}
{% } %} {% if (slot.instructions.work_instruction) { %}
{%= slot.instructions.work_instruction %}
{% } %}
{% } %}
{% }); %}
{% } else if (!(completed && completed.length) && !(pending_submission && pending_submission.length) && !(to_manufacture && to_manufacture.length) && !(queue && queue.length) && !(today_sessions && today_sessions.length)) { %}
{{ __("No active jobs and the queue is empty.") }}
{% } %} {% if (pending_submission && pending_submission.length > 0) { %}
{{ __("Ready to Submit") }}
{{ pending_submission.length === 1 ? __("1 draft job card awaiting submission") : __("{0} draft job cards awaiting submission", [pending_submission.length]) }}
{% pending_submission.forEach((jc) => { %}
{{ __("Qty Done") }}
{% if (jc.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(jc.finished_good || jc.production_item, 2) }}
{% } %}
{{ jc.finished_good || jc.production_item }}
{{ jc.operation }}
{{ jc.name }}
{{ format_number(jc.total_completed_qty, null, 0) }} / {{ format_number(jc.for_quantity, null, 0) }}
{{ jc.fg_uom || '' }}
{{ __("Submit") }}
{% }); %}
{% } %} {% if (to_manufacture && to_manufacture.length > 0) { %}
{{ __("To Manufacture") }}
{{ to_manufacture.length === 1 ? __("1 job card awaiting Manufacture entry") : __("{0} job cards awaiting Manufacture entry", [to_manufacture.length]) }}
{% to_manufacture.forEach((jc) => { %}
{{ __("To Manufacture") }}
{% if (jc.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(jc.finished_good || jc.production_item, 2) }}
{% } %}
{{ jc.finished_good || jc.production_item }}
{{ jc.operation }}
{{ jc.name }}
{{ format_number(jc.total_completed_qty, null, 0) }} / {{ format_number(jc.for_quantity, null, 0) }}
{{ jc.fg_uom || '' }}
{{ __("Make Stock Entry") }}
{% }); %}
{% } %} {% if (queue.length > 0) { %}
{{ __("Up Next") }}
{{ queue.length === 1 ? __("1 pending job card") : __("{0} pending job cards", [queue.length]) }}
{% queue.forEach((jc) => { %}
{{ __(jc.status) }}
{% if (jc.is_subcontracted) { %}
{{ __("Sub") }}
{% } %}
{% if (jc.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(jc.finished_good || jc.production_item, 2) }}
{% } %}
{{ jc.finished_good || jc.production_item }}
{{ jc.operation }}
{{ jc.name }}
{{ format_number(jc.for_quantity, null, 0) }}
{{ jc.fg_uom || '' }}
{{ jc._materials_ready ? __("Materials Ready") : __("Awaiting Transfer") }}
{% if (jc._materials_ready) { %}
{{ __("Start") }}
{% } else { %}
{{ __("Transfer") }}
{% } %}
{% }); %}
{% } %} {% if (completed && completed.length > 0) { %}
{{ __("Completed Operations") }}
{{ completed.length === 1 ? __("1 completed job card") : __("{0} completed job cards", [completed.length]) }}
{% completed.forEach((jc) => { %}
{{ __(jc.status) }}
{% if (jc.is_subcontracted) { %}
{{ __("Sub") }}
{% } %}
{% if (jc.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(jc.finished_good || jc.production_item, 2) }}
{% } %}
{{ jc.finished_good || jc.production_item }}
{{ jc.operation }}
{{ jc.name }}
{{ format_number(jc.total_completed_qty, null, 0) }} / {{ format_number(jc.for_quantity, null, 0) }}
{{ jc.fg_uom || '' }}
{% }); %}
{% } %} {% if (today_sessions && today_sessions.length > 0) { %}
{{ __("Today's Sessions") }}
{{ today_sessions.length === 1 ? __("1 submitted today") : __("{0} submitted today", [today_sessions.length]) }}
{% today_sessions.forEach((s) => { %} {% var mins = cint(s.total_time_in_mins); var hh = Math.floor(mins / 60); var mm = mins % 60; var dur = mins ? (hh ? hh + 'h ' : '') + mm + 'm' : '—'; %}
{{ __(s.status) }}
{% if (s.item_image) { %}
{% } else { %}
{{ frappe.get_abbr(s.finished_good || s.production_item, 2) }}
{% } %}
{{ s.finished_good || s.production_item }}
{{ s.operation }}
{{ s.name }}
{{ format_number(s.total_completed_qty, null, 0) }} / {{ format_number(s.for_quantity, null, 0) }} {% if (cint(s.process_loss_qty) > 0) { %}
{{ __("Loss") }}: {{ format_number(s.process_loss_qty, null, 0) }}
{% } %}
{{ __("Duration") }}: {{ dur }}
{% }); %}
{% } %}