implemented adding positions to document

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-07-15 22:24:05 +02:00
parent e436f09698
commit 31916d83df
4 changed files with 34 additions and 12 deletions

View File

@@ -15,18 +15,18 @@
function estimateSelected(estimate){
select({
code:t('estimated_time'),
subject:estimate.name,
item_code:t('estimated_time'),
title:estimate.name,
description:estimate.description.source,
amount:estimate.estimated_time,
unit:doc.currency+"/h"
unit:t('document.hours')
});
}
function itemSelected(item){
select({
code:item.code,
subject:item.name,
item_code:item.code,
title:item.name,
description:item.description.source,
amount:1,
unit:item.unit,
@@ -37,11 +37,12 @@
function timeSelected(time){
select({
code:t('document.timetrack'),
item_code:t('document.timetrack'),
title:time.subject,
description:time.description.source,
amount:time.duration,
unit:doc.currency+"/h"
unit:t('document.hours'),
time_id:time.id
});
}
</script>

View File

@@ -71,6 +71,7 @@
body:JSON.stringify(selected)
});
if (resp.ok){
doc.positions = await resp.json();
} else {
error = await resp.text();
}