added CRUD for Projects,

added set project for report
This commit is contained in:
2026-08-22 23:48:15 +02:00
parent 369b3b7728
commit b747b586b3
17 changed files with 1118 additions and 65 deletions
+29 -9
View File
@@ -2,7 +2,7 @@
* Generated by APIlite
* https://gitea.tpsoft.org/TPsoft.org/APIlite
*
* 2026-07-07 22:15:38 */
* 2026-08-22 20:42:16 */
class backend {
endpoint = import.meta.env.VITE_BACKENDAPI_URL;
@@ -154,8 +154,8 @@ class backend {
return this.callPromise('__HELP__', {});
}
add(title, description, status, group, priority) {
return this.callPromise('add', {title: title, description: description, status: status, group: group, priority: priority});
add(title, description, status, project_id, priority) {
return this.callPromise('add', {title: title, description: description, status: status, project_id: project_id, priority: priority});
}
update(report_id, report_data) {
@@ -170,16 +170,16 @@ class backend {
return this.callPromise('get', {report_id: report_id});
}
getAll(status, page) {
return this.callPromise('getAll', {status: status, page: page});
getAll(status, page, project_id) {
return this.callPromise('getAll', {status: status, page: page, project_id: project_id});
}
getAllGrouped(status, page) {
return this.callPromise('getAllGrouped', {status: status, page: page});
getAllGrouped(status, page, project_id) {
return this.callPromise('getAllGrouped', {status: status, page: page, project_id: project_id});
}
getArchived(page) {
return this.callPromise('getArchived', {page: page});
getArchived(page, project_id) {
return this.callPromise('getArchived', {page: page, project_id: project_id});
}
updateOrdNum(ordnums) {
@@ -190,6 +190,26 @@ class backend {
return this.callPromise('updateStatus', {report_id: report_id, status: status});
}
projectGetAll(include_archived) {
return this.callPromise('projectGetAll', {include_archived: include_archived});
}
projectGet(project_id) {
return this.callPromise('projectGet', {project_id: project_id});
}
projectAdd(name, code, color) {
return this.callPromise('projectAdd', {name: name, code: code, color: color});
}
projectUpdate(project_id, name, color) {
return this.callPromise('projectUpdate', {project_id: project_id, name: name, color: color});
}
projectArchive(project_id, archived) {
return this.callPromise('projectArchive', {project_id: project_id, archived: archived});
}
attachmentAdd(report_id, attachment_type, attachment_content) {
return this.callPromise('attachmentAdd', {report_id: report_id, attachment_type: attachment_type, attachment_content: attachment_content});
}