initial "project" commit
This commit is contained in:
parent
7872049a1c
commit
bbbacc3fbf
@ -7,23 +7,59 @@
|
|||||||
// list all projects
|
// list all projects
|
||||||
public function index($f3){
|
public function index($f3){
|
||||||
$this->check_access($f3);
|
$this->check_access($f3);
|
||||||
|
|
||||||
|
$db = $f3->get('DB');
|
||||||
|
|
||||||
|
// retrieve projects
|
||||||
|
$projects = $db->exec('SELECT * FROM projects ORDER BY created_at DESC');
|
||||||
|
|
||||||
|
$f3->set('projects', $projects);
|
||||||
|
|
||||||
|
|
||||||
$f3->set('content', '../ui/views/project/index.html');
|
$f3->set('content', '../ui/views/project/index.html');
|
||||||
echo \Template::instance()->render('../ui/templates/layout.html');
|
echo \Template::instance()->render('../ui/templates/layout.html');
|
||||||
|
|
||||||
|
$f3->clear('SESSION.error');
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a new project
|
// create a new project
|
||||||
public function createForm($f3){
|
public function createForm($f3){
|
||||||
|
$this->check_access($f3);
|
||||||
|
$f3->set('content', '../ui/views/project/create.html');
|
||||||
|
echo \Template::instance()->render('../ui/templates/layout.html');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create($f3){
|
public function create($f3){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// show project details including links, tickets, events, tasks
|
// show project details including links, tickets, events, tasks
|
||||||
public function view($f3){}
|
public function view($f3){
|
||||||
|
$this->check_access($f3);
|
||||||
|
|
||||||
|
$project_id = $f3->get('PARAMS.id');
|
||||||
|
$db = $f3->get('DB');
|
||||||
|
|
||||||
|
$result = $db->exec(
|
||||||
|
'SELECT * FROM projects WHERE id = ? LIMIT 1', [$project_id]
|
||||||
|
);
|
||||||
|
$project = $result[0];
|
||||||
|
$f3->set('project', $project);
|
||||||
|
|
||||||
|
$f3->set('content', '../ui/views/project/view.html');
|
||||||
|
echo \Template::instance()->render('../ui/templates/layout.html');
|
||||||
|
}
|
||||||
|
|
||||||
// update project details
|
// update project details
|
||||||
public function editForm($f3){}
|
public function editForm($f3){
|
||||||
|
|
||||||
|
$this->check_access($f3);
|
||||||
|
$f3->set('content', '../ui/views/project/edit.html');
|
||||||
|
echo \Template::instance()->render('../ui/templates/layout.html');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function update($f3){}
|
public function update($f3){}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -16,7 +16,7 @@ class ParsedownHelper extends \Prefab {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<pre>'.print_r($args,1).'<pre>';
|
// return '<pre>'.print_r($args,1).'</pre>';
|
||||||
|
|
||||||
$content = $args[0];
|
$content = $args[0];
|
||||||
$content_token = \Template::instance()->token($content);
|
$content_token = \Template::instance()->token($content);
|
||||||
|
|||||||
@ -43,6 +43,7 @@ $f3->route('GET /dashboard', function($f3){
|
|||||||
}
|
}
|
||||||
echo 'Welcome to the dashboard' . $f3->get('SESSION.username');
|
echo 'Welcome to the dashboard' . $f3->get('SESSION.username');
|
||||||
echo '<a href="/logout">logout</a>';
|
echo '<a href="/logout">logout</a>';
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// tickets - CRUD (CREATE, READ, UPDATE, DELETE)
|
// tickets - CRUD (CREATE, READ, UPDATE, DELETE)
|
||||||
|
|||||||
@ -42,9 +42,9 @@
|
|||||||
<div id="mainNavbar" class="navbar-menu">
|
<div id="mainNavbar" class="navbar-menu">
|
||||||
<div class="navbar-start">
|
<div class="navbar-start">
|
||||||
<a class="navbar-item" href="/dashboard">Dashboard</a>
|
<a class="navbar-item" href="/dashboard">Dashboard</a>
|
||||||
|
<a class="navbar-item" href="/kb">Knowledge Base</a>
|
||||||
<a class="navbar-item" href="/projects">Projects</a>
|
<a class="navbar-item" href="/projects">Projects</a>
|
||||||
<a class="navbar-item" href="/tickets">Tickets</a>
|
<a class="navbar-item" href="/tickets">Tickets</a>
|
||||||
<a class="navbar-item" href="/kb">Knowledge Base</a>
|
|
||||||
<a class="navbar-item" href="/tags">Tags</a>
|
<a class="navbar-item" href="/tags">Tags</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-end">
|
<div class="navbar-end">
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
<check if="{{@articles}}">
|
<check if="{{@articles}}">
|
||||||
<table class="table is-fullwidth is-bordered">
|
<table class="table is-fullwidth is-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr class="has-background-info">
|
||||||
<th>id</th><th>title</th><th>created_at</th>
|
<th>id</th><th>title</th><th>created_at</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -50,8 +50,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<repeat group="{{@articles}}" value="{{@article}}">
|
<repeat group="{{@articles}}" value="{{@article}}">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/kb/{{@article.id}}">{{@article.id}}</a></td>
|
<td>{{@article.id}}</td>
|
||||||
<td>{{@article.title}}</td>
|
<td><a href="/kb/{{@article.id}}">{{@article.title}}</a></td>
|
||||||
<td>{{@article.created_at}}</td>
|
<td>{{@article.created_at}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/kb/{{@article.id}}/edit"><i class="fa fa-edit"></i></a>
|
<a href="/kb/{{@article.id}}/edit"><i class="fa fa-edit"></i></a>
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
<h1 class="title">{{@article.title}}</h1>
|
<h1 class="title">{{@article.title}}</h1>
|
||||||
|
<p><a href="/kb/{{ @article.id}}/edit">edit article</a></p>
|
||||||
|
<hr>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<parsedown>{{ @article.content | raw }}</parsedown>
|
<parsedown>{{ @article.content | raw }}</parsedown>
|
||||||
|
|||||||
3
ui/views/project/create.html
Normal file
3
ui/views/project/create.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<pre>
|
||||||
|
TODO: create form.
|
||||||
|
</pre>
|
||||||
3
ui/views/project/edit.html
Normal file
3
ui/views/project/edit.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<pre>
|
||||||
|
TODO: edit form
|
||||||
|
</pre>
|
||||||
@ -1,8 +1,9 @@
|
|||||||
<h3 class="title">Projects</h3>
|
<h3 class="title">Projects</h3>
|
||||||
|
<a href="/project/create">create new project</a>
|
||||||
|
<hr>
|
||||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="is-primary">
|
<tr class="has-background-primary">
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Requester</th>
|
<th>Requester</th>
|
||||||
@ -13,122 +14,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<repeat group="{{ @projects }}" value="{{ @p }}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{id}</td>
|
<td>{{ @p.id }}</td>
|
||||||
<td>{title}</td>
|
<td><a href="/project/{{@p.id}}">{{ @p.title }}</a></td>
|
||||||
<td>{requester}</td>
|
<td>{{ @p.requester }}</td>
|
||||||
<td>{created_by}</td>
|
<td>{{ @p.created_by }}</td>
|
||||||
<td>{created_at}</td>
|
<td>{{ @p.created_at }}</td>
|
||||||
<td>{start_date}</td>
|
<td>{{ @p.start_date }}</td>
|
||||||
<td>{end_date}</td>
|
<td>{{ @p.end_date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</repeat>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="title">Project {NAME}</h3>
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column is-two-thirds">
|
|
||||||
<h3 class="title subtitle">Overview</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<div class="block">
|
|
||||||
<h3 class="title subtitle">Links</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column">
|
|
||||||
<h3 class="title subtitle">Tickets</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<h3 class="title subtitle">Tasks</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<h3 class="title subtitle">Events</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column">
|
|
||||||
<h3 class="title">Timeline</h3>
|
|
||||||
<div class="skeleton-lines">
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<parsedown inline="true">
|
|
||||||
---
|
|
||||||
## View project
|
|
||||||
|
|
||||||
A central place to see everything for this project:
|
|
||||||
|
|
||||||
- Overview: (title, description, links, start/end dates).
|
|
||||||
- related tickets (with status and priorities)
|
|
||||||
- events
|
|
||||||
- tasks
|
|
||||||
- timeline combining events, tickets, milestone dates
|
|
||||||
|
|
||||||
## Example Workflow
|
|
||||||
|
|
||||||
- create a project - `team manager overview`
|
|
||||||
-- attach relevant links
|
|
||||||
- add tickets - each new request or issue can be a ticket referencing this project
|
|
||||||
- add events - quick notes about management meetings, or verbal discussions that don't need ticket overhead
|
|
||||||
-- meeting on 01 jan to discuss layout
|
|
||||||
-- teams message on 28 jan clarifying data requirements
|
|
||||||
- project tasks - for smaller to do items that don't warrant a full ticket
|
|
||||||
-- identify location of required data, create initial pq connections, build a mockup layout
|
|
||||||
|
|
||||||
## Reporting Timelines
|
|
||||||
- timeline view - merge ticket data with project_events sorted by date - chronological Overview
|
|
||||||
- status summaries - how many tickets open, on hold, completed
|
|
||||||
- progress tracking - sumarries or gantt style charts
|
|
||||||
</parsedown>
|
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
<h3 class="title">{{ @project.title }}</h3>
|
||||||
|
<p><a href="/project/{{ @project.id}}/edit">edit project</a></p>
|
||||||
|
<hr>
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column is-two-thirds">
|
||||||
|
<h3 class="title subtitle">Overview</h3>
|
||||||
|
<div class="box">
|
||||||
|
<parsedown>{{ @project.description }}</parsedown>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<div class="block">
|
||||||
|
<h3 class="title subtitle">Links</h3>
|
||||||
|
<div class="skeleton-lines">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<h3 class="title subtitle">Tickets</h3>
|
||||||
|
<div class="skeleton-lines">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<h3 class="title subtitle">Tasks</h3>
|
||||||
|
<div class="skeleton-lines">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<h3 class="title subtitle">Events</h3>
|
||||||
|
<div class="skeleton-lines">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<h3 class="title">Timeline</h3>
|
||||||
|
<div class="skeleton-lines">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<parsedown inline="true">
|
||||||
|
---
|
||||||
|
## View project
|
||||||
|
|
||||||
|
A central place to see everything for this project:
|
||||||
|
|
||||||
|
- Overview: (title, description, links, start/end dates).
|
||||||
|
- related tickets (with status and priorities)
|
||||||
|
- events
|
||||||
|
- tasks
|
||||||
|
- timeline combining events, tickets, milestone dates
|
||||||
|
|
||||||
|
## Example Workflow
|
||||||
|
|
||||||
|
- create a project - `team manager overview`
|
||||||
|
-- attach relevant links
|
||||||
|
- add tickets - each new request or issue can be a ticket referencing this project
|
||||||
|
- add events - quick notes about management meetings, or verbal discussions that don't need ticket overhead
|
||||||
|
-- meeting on 01 jan to discuss layout
|
||||||
|
-- teams message on 28 jan clarifying data requirements
|
||||||
|
- project tasks - for smaller to do items that don't warrant a full ticket
|
||||||
|
-- identify location of required data, create initial pq connections, build a mockup layout
|
||||||
|
|
||||||
|
## Reporting Timelines
|
||||||
|
- timeline view - merge ticket data with project_events sorted by date - chronological Overview
|
||||||
|
- status summaries - how many tickets open, on hold, completed
|
||||||
|
- progress tracking - sumarries or gantt style charts
|
||||||
|
</parsedown>
|
||||||
Loading…
x
Reference in New Issue
Block a user