@extends('admin.admin_master')

@section('admin')
<div class="page-content">
    <div class="container-fluid">
        <div class="row mb-4">
            <div class="col-12">
                <h4 class="page-title mb-1">Edit Step for Workflow: {{ $workflow->name }}</h4>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                <form action="{{ route('workflow.steps.update', [$workflow->id, $step->id]) }}" method="POST">
                    @csrf
                    @method('PUT')
                    <div class="mb-3">
                        <label for="name" class="form-label">Step Name</label>
                        <input type="text" name="name" id="name" class="form-control" value="{{ $step->name }}" required>
                    </div>
                    <div class="mb-3">
                        <label for="order" class="form-label">Order</label>
                        <input type="number" name="order" id="order" class="form-control" value="{{ $step->order }}">
                    </div>
                    <button type="submit" class="btn btn-success">Update Step</button>
                    <a href="{{ route('workflow.steps.create', $workflow->id) }}" class="btn btn-secondary">Cancel</a>
                </form>
            </div>
        </div>
    </div>
</div>
@endsection
