pridany flow diagram pre BUG,

aktualizovany v README Technologie, struktura a API endpointy
This commit is contained in:
Igor Miňo 2025-05-15 11:09:09 +02:00
parent a02bdb4cbe
commit 5250a6d279
5 changed files with 142 additions and 10 deletions

View File

@ -29,6 +29,7 @@ BugReport je webová aplikácia na sledovanie a správu chýb (bug tracking syst
- [Vue Router](https://router.vuejs.org/) - smerovanie v aplikácii - [Vue Router](https://router.vuejs.org/) - smerovanie v aplikácii
- [Vuedraggable](https://github.com/SortableJS/vue.draggable.next) - drag-and-drop funkcionalita - [Vuedraggable](https://github.com/SortableJS/vue.draggable.next) - drag-and-drop funkcionalita
- [Font Awesome](https://fontawesome.com/) - ikony - [Font Awesome](https://fontawesome.com/) - ikony
- [Mitt](https://github.com/developit/mitt) - knižnica pre správu udalostí
- [Vite](https://vitejs.dev/) - build nástroj - [Vite](https://vitejs.dev/) - build nástroj
## Štruktúra projektu ## Štruktúra projektu
@ -52,6 +53,7 @@ BugReport/
├── views/ # Vue stránky ├── views/ # Vue stránky
├── App.vue # Hlavná Vue komponenta ├── App.vue # Hlavná Vue komponenta
├── backend.js # Komunikácia s API ├── backend.js # Komunikácia s API
├── events.js # Správa udalostí
├── main.js # Vstupný bod Vue aplikácie ├── main.js # Vstupný bod Vue aplikácie
└── router.js # Vue Router konfigurácia └── router.js # Vue Router konfigurácia
``` ```
@ -99,16 +101,19 @@ API je dostupné cez `api.php` endpoint. Všetky požiadavky vracajú JSON odpov
| `update` | Aktualizuje report | `report_id`, `report_data` (JSON) | | `update` | Aktualizuje report | `report_id`, `report_data` (JSON) |
| `delete` | Vymaže report | `report_id` | | `delete` | Vymaže report | `report_id` |
| `get` | Získa jeden report | `report_id` | | `get` | Získa jeden report | `report_id` |
| `getall` | Získa všetky reporty | `status` (voliteľné) | | `getAll` | Získa všetky reporty | `status` (voliteľné) |
| `getallgrouped` | Získa reporty zoskupené podľa stavu | `status` (voliteľné) | | `getAllGrouped` | Získa reporty zoskupené podľa stavu | `status` (voliteľné) |
| `updateordnum` | Aktualizuje poradie reportov | `ordnums` (JSON) | | `updateOrdNum` | Aktualizuje poradie reportov | `ordnums` (JSON) |
| `updatestatus` | Aktualizuje stav reportu | `report_id`, `status` | | `updateStatus` | Aktualizuje stav reportu | `report_id`, `status` |
| `attachmentAdd` | Pridá prílohu k reportu | `report_id`, `attachment_type`, `attachment_content` |
| `attachmentUpdate` | Aktualizuje prílohu | `attachment_id`, `attachment_content` |
| `attachmentGetAll` | Získa všetky prílohy reportu | `report_id` |
### Príklad API volania ### Príklad API volania
```javascript ```javascript
// Získanie všetkých reportov // Získanie všetkých reportov
fetch('api.php?action=getall') fetch('api.php?action=getAll')
.then(response => response.json()) .then(response => response.json())
.then(data => console.log(data)); .then(data => console.log(data));

120
doc/FlowDiagram.drawio Normal file
View File

@ -0,0 +1,120 @@
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/27.0.5 Chrome/134.0.6998.205 Electron/35.3.0 Safari/537.36" version="27.0.5">
<diagram name="Page-1" id="74e2e168-ea6b-b213-b513-2b3c1d86103e">
<mxGraphModel dx="1783" dy="1051" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="77e6c97f196da883-1" value="BugReport v 0.1" style="swimlane;html=1;childLayout=stackLayout;startSize=20;rounded=0;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="40" width="800" height="560" as="geometry" />
</mxCell>
<mxCell id="77e6c97f196da883-2" value="Nezaradené" style="swimlane;html=1;startSize=20;" parent="77e6c97f196da883-1" vertex="1">
<mxGeometry y="20" width="160" height="540" as="geometry">
<mxRectangle y="20" width="40" height="730" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="77e6c97f196da883-8" value="V tomto stave ostáva kým na ne pozriem a zhodnotim, či niečo potrebujem doplniť" style="rounded=1;whiteSpace=wrap;html=1;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" parent="77e6c97f196da883-2" vertex="1">
<mxGeometry x="20" y="65" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-2" source="77e6c97f196da883-8" target="bH6rxZphyOiop9y04Wjb-9">
<mxGeometry relative="1" as="geometry">
<mxPoint x="70" y="170" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-9" value="" style="rhombus;whiteSpace=wrap;html=1;rounded=0;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" vertex="1" parent="77e6c97f196da883-2">
<mxGeometry x="30" y="180" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="77e6c97f196da883-3" value="Čakajúce" style="swimlane;html=1;startSize=20;" parent="77e6c97f196da883-1" vertex="1">
<mxGeometry x="160" y="20" width="160" height="540" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-6" value="Uloha má všetko pre začatie, čaká na najbližši voľný čas" style="rounded=1;whiteSpace=wrap;html=1;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" vertex="1" parent="77e6c97f196da883-3">
<mxGeometry x="30" y="250" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="77e6c97f196da883-4" value="Rozpracované" style="swimlane;html=1;startSize=20;" parent="77e6c97f196da883-1" vertex="1">
<mxGeometry x="320" y="20" width="160" height="540" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-4" source="bH6rxZphyOiop9y04Wjb-17" target="bH6rxZphyOiop9y04Wjb-20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-17" value="Aktuálne sa na úlohe pracuje, alebo je rozpracovaná a v najbližšom pracovnom čase sa pokračuje" style="rounded=1;whiteSpace=wrap;html=1;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" vertex="1" parent="77e6c97f196da883-4">
<mxGeometry x="30" y="250" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-20" value="" style="rhombus;whiteSpace=wrap;html=1;rounded=0;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" vertex="1" parent="77e6c97f196da883-4">
<mxGeometry x="40" y="360" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="77e6c97f196da883-5" value="Blokované" style="swimlane;html=1;startSize=20;" parent="77e6c97f196da883-1" vertex="1">
<mxGeometry x="480" y="20" width="160" height="540" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-10" value="Nemám dostatok informácií k začatiu, alebo za niečim čakám" style="rounded=1;whiteSpace=wrap;html=1;shadow=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=8;align=center;" vertex="1" parent="77e6c97f196da883-5">
<mxGeometry x="30" y="180" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="77e6c97f196da883-6" value="Archivované" style="swimlane;html=1;startSize=20;" parent="77e6c97f196da883-1" vertex="1">
<mxGeometry x="640" y="20" width="160" height="540" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-25" value="Hotovo" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.flowchart.or;" vertex="1" parent="77e6c97f196da883-6">
<mxGeometry x="45" y="430" width="70" height="70" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-9" target="bH6rxZphyOiop9y04Wjb-6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="110" y="280" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-8" value="Mám všetko" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-7">
<mxGeometry x="-0.3755" relative="1" as="geometry">
<mxPoint x="40" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-9" target="bH6rxZphyOiop9y04Wjb-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-12" value="Chýba niečo" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-11">
<mxGeometry x="-0.9025" relative="1" as="geometry">
<mxPoint x="11" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-10" target="77e6c97f196da883-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-14" value="Po doplnení opäť vyžaduje zhodnotenie" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-13">
<mxGeometry x="-0.8157" relative="1" as="geometry">
<mxPoint x="-50" y="-52" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-6" target="bH6rxZphyOiop9y04Wjb-17">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-19" value="Začínam&amp;nbsp;&lt;div&gt;pracovať&lt;/div&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-18">
<mxGeometry x="-0.6651" y="1" relative="1" as="geometry">
<mxPoint x="20" y="-19" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-20" target="bH6rxZphyOiop9y04Wjb-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-23" value="Počas práce niečo chýba" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-22">
<mxGeometry x="-0.8409" relative="1" as="geometry">
<mxPoint x="29" y="-20" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="77e6c97f196da883-1" source="bH6rxZphyOiop9y04Wjb-20" target="bH6rxZphyOiop9y04Wjb-25">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-27" value="Všetko fixnuté" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-26">
<mxGeometry x="-0.0121" y="1" relative="1" as="geometry">
<mxPoint x="-68" y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="bH6rxZphyOiop9y04Wjb-1" target="77e6c97f196da883-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-3" value="Vytvorený nový BUG" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="bH6rxZphyOiop9y04Wjb-2">
<mxGeometry x="-0.475" y="-1" relative="1" as="geometry">
<mxPoint x="28" y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bH6rxZphyOiop9y04Wjb-1" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" vertex="1" parent="1">
<mxGeometry y="145" width="20" height="20" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@ -235,7 +235,8 @@ function attachmentUpdate($attachment_id, $attachment_content) {
global $db; global $db;
if (strlen(trim($attachment_content)) <= 0) return attachmentDelete($attachment_id); if (strlen(trim($attachment_content)) <= 0) return attachmentDelete($attachment_id);
$stm = $db->update('attachments', [ $stm = $db->update('attachments', [
'attachment_content' => $attachment_content 'attachment_content' => $attachment_content,
'updated_dt' => date('Y-m-d H:i:s')
], [ ], [
'attachment_id' => $attachment_id 'attachment_id' => $attachment_id
]); ]);

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 208 KiB

View File

@ -2,7 +2,7 @@
<div id="about"> <div id="about">
<div> <div>
<h1>O aplikácii</h1> <h1>O aplikácii</h1>
<img src="/public/bugreport.svg" height="100" alt="" /> <img src="/bugreport.svg" height="100" alt="" />
<h2>Bug Report</h2> <h2>Bug Report</h2>
<p> <p>
Verzia aplikácie: {{ version }} &nbsp;|&nbsp; Zostavené: {{ build }} Verzia aplikácie: {{ version }} &nbsp;|&nbsp; Zostavené: {{ build }}
@ -12,21 +12,21 @@
<div> <div>
Backend thanks for <br /> Backend thanks for <br />
<a href="https://www.php.net" target="_blank"> <a href="https://www.php.net" target="_blank">
<img src="/public/php-power-micro.png" height="20" alt="" /> <br /> <img src="/php-power-micro.png" height="20" alt="" /> <br />
PHP 8.2 PHP 8.2
</a> </a>
</div> </div>
<div> <div>
Database thanks for <br> Database thanks for <br>
<a href="https://www.sqlite.org" target="_blank"> <a href="https://www.sqlite.org" target="_blank">
<img src="/public/SQLite370.svg" height="20" alt="" /> <br> <img src="/SQLite370.svg" height="20" alt="" /> <br>
SQLite SQLite
</a> </a>
</div> </div>
<div> <div>
Frontend thanks for <br> Frontend thanks for <br>
<a href="https://vuejs.org" target="_blank"> <a href="https://vuejs.org" target="_blank">
<img src="/public/vue.svg" height="20" alt="" /> <br> <img src="/vue.svg" height="20" alt="" /> <br>
Vue 3 Vue 3
</a> </a>
</div> </div>
@ -38,6 +38,8 @@
>https://gitea.tpsoft.org/TPsoft.org/BugReport</a >https://gitea.tpsoft.org/TPsoft.org/BugReport</a
> >
</p> </p>
<h2>Diagram stavov pre BUG</h2>
<img src="/FlowDiagram.drawio.svg" alt="" width="90%" />
</div> </div>
</div> </div>
</template> </template>