implemented adding positions to document
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
body:JSON.stringify(selected)
|
||||
});
|
||||
if (resp.ok){
|
||||
doc.positions = await resp.json();
|
||||
} else {
|
||||
error = await resp.text();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user