Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature create core layout #40

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions public/img/icon-members.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/img/icon-project-summary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/logo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions resources/views/layout/core/header.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<header class="bg-main-400 sticky top-0 right-0 flex justify-between items-center py-5 px-4 lg:px-16 xl:px-24">
<h1>
<a href={{ route('main') }}>
<img src="/img/logo-light.png" alt="">
</a>
</h1>

<nav>
<ul class="gap-4 font-medium text-white hidden lg:flex">
<li>
<a href={{ route('main') }}>Area de trabalho</a>
</li>
<li>
<a href="">Projetos</a>
</li>
<li>
<a href="">Equipes e pessoas</a>
</li>
</ul>
</nav>
</header>
11 changes: 11 additions & 0 deletions resources/views/layout/core/layout-full.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="block lg:grid grid-cols-[minmax(10vw,_250px)_1fr] h-full">
@include('layout.core.project-management-aside')

<div class="grid grid-rows-[125px,_1fr] max-h-screen">
@include('layout.core.header')

<main class="h-full overflow-y-scroll lg:p-16">
@yield('content')
</main>
</div>
</div>
7 changes: 7 additions & 0 deletions resources/views/layout/core/layout-partial.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="block lg:grid grid-rows-[125px,_1fr] max-h-screen">
@include('layout.core.header')

<main class="h-full overflow-y-scroll lg:p-16 xl:p-24">
@yield('content')
</main>
</div>
21 changes: 21 additions & 0 deletions resources/views/layout/core/layout.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>{{$title ?? 'Diagier'}}</title>
@vite('resources/css/app.css')
</head>

<body class="h-screen max-h-screen">
@if(Route::is('tasks.index'))
@include('layout.core.layout-full')
@else
@include('layout.core.layout-partial')
@endif

</body>

</html>
28 changes: 28 additions & 0 deletions resources/views/layout/core/project-management-aside.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<aside class="bg-main-400 pt-[calc(125px+24px)] text-white px-8 hidden lg:block">
<h2 class="mb-8 text-xl font-bold">Projeto</h2>

<nav>
<ul class="flex flex-col gap-6">
<li>
<a class="flex gap-2 items-center font-medium text-lg" href="#" aria-label="Resumo do projeto">
<img src="/img/icon-project-summary.svg" class="" alt="">
<span>Resumo do Projeto</span>
</a>
</li>
<li>

<a class="flex gap-2 items-center font-medium text-lg" href="#">
<img src="/img/icon-project-summary.svg" alt="">
<span>Documentos</span>
</a>
</li>
<li>
<a class="flex gap-2 items-center font-medium text-lg" href="#">
<img src="/img/icon-members.svg" alt="">
<span>Membros da Equipe</span>
</a>
</li>
</ul>
</nav>

</aside>
147 changes: 69 additions & 78 deletions resources/views/pages/tasks/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,82 +1,73 @@
@extends('layout.layout')
@extends('layout.core.layout')

@section('content')
<div class="row">
<div class="col-md-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mt-5" style="color: #50bcb3;">
<li class="breadcrumb-item"><a href="/" style="color: #50bcb3;">Home</a></li>
<li class="breadcrumb-item"><a href="{{ route('developers.index') }}" style="color: #50bcb3;">Developer</a></li>
<li class="breadcrumb-item active" aria-current="page"><a href="{{ route('projects.index') }}" style="color: #50bcb3;">Project</a></li>
<li class="breadcrumb-item"><a href="{{ route('tasks.index') }}" style="color: #50bcb3;">Task</a></li>
<li class="breadcrumb-item"><a href="{{ route('feedbacks.index') }}" style="color: #50bcb3;">Feedback</a></li>
</ol>
</nav>
<h2 class="mt-5 mb-5" style="color: #50bcb3;">
Tasks
</h2>
<div class="card">
<div class="card-header bg-blue" style="background-color: #50bcb3;">
<h4 class="mb-0 text-black">Tasks</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-lg">
<thead>
<tr>
<th scope="col" style="color: #50bcb3;">ID</th>
<th scope="col" style="color: #50bcb3;">Name</th>
<th scope="col" style="color: #50bcb3;">Description</th>
<th scope="col" style="color: #50bcb3;">Comments</th>
<th scope="col" style="color: #50bcb3;">Sprint</th>
<th scope="col" style="color: #50bcb3;">Priority</th>
<th scope="col" style="color: #50bcb3;">Status</th>
<th scope="col" style="color: #50bcb3;">Developer</th>
<th scope="col" style="color: #50bcb3;">Project</th>
<th scope="col" style="color: #50bcb3;">Actions</th>
</tr>
</thead>
<tbody>
@foreach($tasks as $task)
<tr>
<td>{{ $task->id }}</td>
<td>{{ $task->name }}</td>
<td>{{ $task->description }}</td>
<td>{{ $task->comments }}</td>
<td>{{ $task->sprint->format('d/m/Y') }}</td>
<td>{{ $task->priority }}</td>
<td>{{ $task->status }}</td>
<td>{{ $task->developer ? $task->developer->name : 'N/A' }}</td>
<td>{{ $task->project ? $task->project->name : 'N/A' }}</td>
<td>
<div class="btn-group">
@can('update', $task)
<a href="{{ route('tasks.edit', $task->id) }}" class="btn btn-primary btn-sm square-btn"><i class="material-icons">edit</i></a>
@endcan
<form action="{{ route('tasks.destroy', $task->id) }}" method="POST" style="display: inline;">
@csrf
@method('DELETE')
@can('delete', $task)
<button type="submit" class="btn btn-danger btn-sm square-btn"><i class="material-icons">delete</i></button>
@endcan
</form>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
{{ $tasks->links() }}
</div>
@can('create', App\Models\Task::class)
<div class="mt-3">
<a href="{{ route('tasks.create') }}" class="btn btn-secondary" style="background-color: #50bcb3;">Create</a>
</div>
@endcan
</div>
<section>
<nav>
<ul class="text-main-400 flex gap-4">
<li><a href="/" class="text-main-400">Home</a></li>
<li><a href="{{ route('developers.index') }}" class="text-main-400">Developer</a></li>
<li><a href="{{ route('projects.index') }}" class="text-main-400">Project</a></li>
<li><a href="{{ route('tasks.index') }}" class="text-main-400">Task</a></li>
<li><a href="{{ route('feedbacks.index') }}" class="text-main-400">Feedback</a></li>
</ul>
</nav>

<div>
<h3 class="bg-main-400">Tasks</h3>

<table class="block max-w-full overflow-x-scroll">
<thead>
<tr class="w-full">
<th class="min-w-[250px] text-main-400 text-left" scope="col">ID</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Name</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Description</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Comments</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Sprint</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Priority</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Status</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Developer</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Project</th>
<th class="min-w-[250px] text-main-400 text-left" scope="col">Actions</th>
</tr>
</thead>
<tbody>
@foreach($tasks as $task)
<tr>
<td>{{ $task->id }}</td>
<td>{{ $task->name }}</td>
<td>{{ $task->description }}</td>
<td>{{ $task->comments }}</td>
<td>{{ $task->sprint->format('d/m/Y') }}</td>
<td>{{ $task->priority }}</td>
<td>{{ $task->status }}</td>
<td>{{ $task->developer ? $task->developer->name : 'N/A' }}</td>
<td>{{ $task->project ? $task->project->name : 'N/A' }}</td>
<td>
<div>
@can('update', $task)
<a href="{{ route('tasks.edit', $task->id) }}">edit</a>
@endcan
<form action="{{ route('tasks.destroy', $task->id) }}" method="POST" style="display: inline;">
@csrf
@method('DELETE')
@can('delete', $task)
<button type="submit">delete</button>
@endcan
</form>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>

<div>{{ $tasks->links() }}</div>

@can('create', App\Models\Task::class)
<div class="mt-3">
<a href="{{ route('tasks.create') }}" class="bg-main-400">Create</a>
</div>
@endcan
</div>
</div>
@endsection
</section>
@endsection
5 changes: 5 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export default {
screens: {
"custom-xl": "1200px",
},
colors: {
main: {
400: "#4EA2A5",
},
},
},
},
plugins: [],
Expand Down