Initial commit
This commit is contained in:
44
resources/views/traffic/create.blade.php
Normal file
44
resources/views/traffic/create.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<h2>{{ isset($project) ? 'Edit project' : 'Create project' }}</h2>
|
||||
@include('commons.notifications')
|
||||
<form action="{{ isset($project) ? route('projects.update', $project->id) : route('projects.store') }}" method="POST">
|
||||
<input type="hidden" name="user_id" value="{{ \Auth::user()->id }}">
|
||||
|
||||
@csrf
|
||||
@if (isset($project))
|
||||
@method('PUT')
|
||||
@endif
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Project Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" value="{{ $project->name ?? '' }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="description" class="form-label">Description</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="4" required>{{ $project->description ?? '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="dependancy" class="form-label">Dependancy</label>
|
||||
<input type="text" class="form-control" id="dependancy" name="dependancy" value="{{ $project->dependancy ?? '' }}" placeholder="e.g., project ID or Name" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="status" class="form-label">Status</label>
|
||||
<select class="form-select" id="status" name="status" required>
|
||||
<option value="" disabled>Select Status</option>
|
||||
<option value="Active" {{ (isset($project) && $project->status == 'Active') ? 'selected' : '' }}>Active</option>
|
||||
<option value="Completed" {{ (isset($project) && $project->status == 'Completed') ? 'selected' : '' }}>Completed</option>
|
||||
<option value="Pending" {{ (isset($project) && $project->status == 'Pending') ? 'selected' : '' }}>Pending</option>
|
||||
<option value="On Hold" {{ (isset($project) && $project->status == 'On Hold') ? 'selected' : '' }}>On Hold</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">{{ isset($project) ? 'Update project' : 'Create project' }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
43
resources/views/traffic/edit.blade.php
Normal file
43
resources/views/traffic/edit.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<h2>{{ isset($project) ? 'Edit project' : 'Create project' }}</h2>
|
||||
@include('commons.notifications')
|
||||
<form action="{{ isset($project) ? route('projects.update', $project->id) : route('projects.store') }}" method="POST">
|
||||
<input type="hidden" name="user_id" value="{{ \Auth::user()->id }}">
|
||||
@csrf
|
||||
@if (isset($project))
|
||||
@method('PUT')
|
||||
@endif
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Project Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" value="{{ $project->name ?? '' }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="description" class="form-label">Description</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="4" required>{{ $project->description ?? '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="dependancy" class="form-label">Dependancy</label>
|
||||
<input type="text" class="form-control" id="dependancy" name="dependancy" value="{{ $project->dependancy ?? '' }}" placeholder="e.g., project ID or Name" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="status" class="form-label">Status</label>
|
||||
<select class="form-select" id="status" name="status" required>
|
||||
<option value="" disabled>Select Status</option>
|
||||
<option value="Active" {{ (isset($project) && $project->status == 'Active') ? 'selected' : '' }}>Active</option>
|
||||
<option value="Completed" {{ (isset($project) && $project->status == 'Completed') ? 'selected' : '' }}>Completed</option>
|
||||
<option value="Pending" {{ (isset($project) && $project->status == 'Pending') ? 'selected' : '' }}>Pending</option>
|
||||
<option value="On Hold" {{ (isset($project) && $project->status == 'On Hold') ? 'selected' : '' }}>On Hold</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">{{ isset($project) ? 'Update project' : 'Create project' }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
57
resources/views/traffic/index.blade.php
Normal file
57
resources/views/traffic/index.blade.php
Normal file
@@ -0,0 +1,57 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
@include('commons.notifications')
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Projects') }}</div>
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="float-end">
|
||||
<a href="/projects/create" class="btn btn-primary btn-sm"><i class="bi bi-plus-circle"></i> Add Project</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-1">#</th>
|
||||
<th class="col-2">Name</th>
|
||||
<th class="col-4">Description</th>
|
||||
<th class="col-1">Status</th>
|
||||
<th class="col-2">Date Created</th>
|
||||
<th class="col-2">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $count = 1; ?>
|
||||
@foreach($projects as $row)
|
||||
<tr>
|
||||
<th scope="row">{{ $count }}</th>
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->description }}</td>
|
||||
<td>{{ $row->status }}</td>
|
||||
<td>{{ $row->created_at }}</td>
|
||||
<td>
|
||||
<a href="{{ url('projects', $row->id)}}" title="View Project Details" class="btn btn-info btn-sm"><i class="bi bi-eye"></i></a>
|
||||
<a href="{{ url('projects/'. $row->id . '/edit') }}" title="Edit Project Details" class="btn btn-warning btn-sm"><i class="bi bi-pen"></i></a>
|
||||
<a href="{{ url('project-status/add_status', $row->id)}}" title="Add New Status" class="btn btn-success btn-sm"><i class="bi bi-plus-square"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
50
resources/views/traffic/show.blade.php
Normal file
50
resources/views/traffic/show.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<h2>{{ isset($comment) ? 'Edit comment' : 'Project Details' }}</h2>
|
||||
@include('commons.notifications')
|
||||
<input type="hidden" name="user_id" value="{{ \Auth::user()->id }}">
|
||||
@csrf
|
||||
@if (isset($comment_body))
|
||||
@method('PUT')
|
||||
@endif
|
||||
<div class="card text-dark bg-light mb-3 card w-100">
|
||||
<div class="card-body">
|
||||
<!-- <h3>Project Details/</h3> -->
|
||||
<h5 class="card-title">{{ $project->name }}</h5>
|
||||
<p class="card-text">Description : {{ $project->description }} </p>
|
||||
<p class="card-text">Date Created : {{ $project->created_at }} </p>
|
||||
<p class="card-text">Last Updated : {{ $project->updated_at }} </p>
|
||||
<a href="{{ url('projects/'. $project->id . '/edit') }}" title="Edit Project Details" class="btn btn-warning btn-sm"><i class="bi bi-pencil"></i> Edit Details</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h3>Status Updates</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Status Update</th>
|
||||
<th scope="col">Current Status</th>
|
||||
<th scope="col">Date Updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $count = 1; ?>
|
||||
@foreach($project->statusInfo as $row)
|
||||
<tr>
|
||||
<th scope="row">{{ $count }}</th>
|
||||
<td>{{ $row->description }}</td>
|
||||
<td>{{ $row->status }}</td>
|
||||
<td>{{ $row->created_at }}</td>
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="{{ url('project-status/add_status', $project->id)}}" class="btn btn-success btn-sm"><i class="bi bi-plus-square"></i> Add New Status Update</a>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user