Charger la fiche intervention mise à jour
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
This commit is contained in:
parent
238e7a6ea4
commit
213cc15820
1 changed files with 4 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ from ..core.models.college import Room
|
||||||
from ..core.models.company import Service, Company
|
from ..core.models.company import Service, Company
|
||||||
from app_new.constants import INTERVENTION_STATUSES, INTERVENTION_TRANSITIONS, PRIORITIES, WORKFLOW_TYPES, WORKFLOW_STATUS_ORDERS
|
from app_new.constants import INTERVENTION_STATUSES, INTERVENTION_TRANSITIONS, PRIORITIES, WORKFLOW_TYPES, WORKFLOW_STATUS_ORDERS
|
||||||
|
|
||||||
interventions_bp = Blueprint('interventions', __name__)
|
interventions_bp = Blueprint('interventions', __name__, template_folder='templates')
|
||||||
|
|
||||||
|
|
||||||
@interventions_bp.route('/')
|
@interventions_bp.route('/')
|
||||||
|
|
@ -404,7 +404,9 @@ def detail(id):
|
||||||
transitions = [(key, value['label']) for key, value in INTERVENTION_STATUSES.items()
|
transitions = [(key, value['label']) for key, value in INTERVENTION_STATUSES.items()
|
||||||
if key in INTERVENTION_TRANSITIONS.get(intervention.status, set()) and key in allowed_workflow_statuses]
|
if key in INTERVENTION_TRANSITIONS.get(intervention.status, set()) and key in allowed_workflow_statuses]
|
||||||
history = intervention.status_history.order_by(StatusChange.created_at.desc()).all()
|
history = intervention.status_history.order_by(StatusChange.created_at.desc()).all()
|
||||||
return render_template('interventions/detail.html',
|
# Utiliser explicitement le template du module. Une ancienne copie globale
|
||||||
|
# de ``interventions/detail.html`` est conservée pour compatibilité.
|
||||||
|
return render_template('detail.html',
|
||||||
intervention=intervention,
|
intervention=intervention,
|
||||||
statuses=INTERVENTION_STATUSES,
|
statuses=INTERVENTION_STATUSES,
|
||||||
transitions=transitions,
|
transitions=transitions,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue