{% extends "base.html" %} {% block title %}{% if detail %}{{ sop.title }} — {% endif %}SOPs — Data Canvas — ICDEV{% endblock %} {% block content %}
← {% if detail %}All SOPs{% else %}Data Canvas{% endif %} {% if detail %}

{{ sop.title }}

v{{ sop.version }} — {{ sop.category }}

{% else %}

Data SOPs

Standard Operating Procedures for data classification review, retention enforcement, PII handling, and backup verification.

{% endif %}
{% if detail %} {# ─────────────────────── DETAIL VIEW ─────────────────────────── #}
{{ sop.status|replace('_',' ')|upper }} {{ sop.category }} v{{ sop.version }}
{{ sop.description }}
{% if sop.purpose %}
Purpose
{{ sop.purpose }}
{% endif %} {% if sop.scope %}
Scope
{{ sop.scope }}
{% endif %}
Procedure Steps
{% if sop.steps %} {% for step in sop.steps %}
{{ step.order }}
{{ step.title }}
{{ step.description }}
Owner: {{ step.owner or '—' }}
{% endfor %} {% else %}

No procedure steps defined.

{% endif %}
Metadata
Owner: {{ sop.owner or '—' }}
Reviewer: {{ sop.reviewer or '—' }}
Approver: {{ sop.approver or '—' }}
Classification: {{ sop.classification or '—' }}
Created: {{ sop.created_at[:10] if sop.created_at else '—' }}
Updated: {{ sop.updated_at[:10] if sop.updated_at else '—' }}
Approval History
{% if approvals %} {% for ap in approvals %}
{{ ap.action|upper }}  ·  By: {{ ap.reviewer or '—' }}  ·  {{ ap.created_at[:16] if ap.created_at else '—' }} {% if ap.comment %}
{{ ap.comment }}
{% endif %}
{% endfor %} {% else %}

No approval actions yet.

{% endif %}
{% if sop.status == 'draft' %} {% endif %} {% if sop.status == 'pending_review' %} {% endif %} {% if sop.status == 'approved' %} {% endif %} Back to List
{% else %} {# ─────────────────────── LIST VIEW ───────────────────────────── #}
{% if sops %} {% for s in sops %}
{{ s.title }}
{{ s.status|replace('_',' ')|upper }} {{ s.category }} v{{ s.version or '1.0' }}
{{ s.description or 'No description' }}
{% endfor %} {% else %}
No SOPs yet. Click + New SOP to create one.
{% endif %}

Procedure Steps
View Full

New SOP

{% endif %} {% endblock %}