From 718a0ee413d4cfba6cc08e3c480015ee762f7b89 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Mon, 26 Feb 2024 16:26:45 +0800 Subject: [PATCH] * Finish waterfall estimate block. task #112310. --- module/block/lang/de.php | 9 +++ module/block/lang/en.php | 9 +++ module/block/lang/fr.php | 9 +++ module/block/lang/zh-cn.php | 9 +++ .../block/ui/waterfallestimateblock.html.php | 68 +++++++++++++++++++ 5 files changed, 104 insertions(+) create mode 100644 module/block/ui/waterfallestimateblock.html.php diff --git a/module/block/lang/de.php b/module/block/lang/de.php index f34d3aac01..da8cec7bee 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -700,6 +700,15 @@ $lang->block->teamachievement->consumedHours = 'Consumed Hours'; $lang->block->teamachievement->totalWorkload = 'Total Workload'; $lang->block->teamachievement->vs = 'VS'; +$lang->block->estimate = new stdclass(); +$lang->block->estimate->costs = 'Costs'; +$lang->block->estimate->workhour = 'Workhour'; +$lang->block->estimate->people = 'People'; +$lang->block->estimate->expect = 'Expect'; +$lang->block->estimate->consumed = 'Consumed'; +$lang->block->estimate->surplus = 'Surplus'; +$lang->block->estimate->hour = 'H'; + $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['project'] = $lang->projectCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index e9078333fa..2b372490d1 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -700,6 +700,15 @@ $lang->block->teamachievement->consumedHours = 'Consumed Hours'; $lang->block->teamachievement->totalWorkload = 'Total Workload'; $lang->block->teamachievement->vs = 'VS'; +$lang->block->estimate = new stdclass(); +$lang->block->estimate->costs = 'Costs'; +$lang->block->estimate->workhour = 'Workhour'; +$lang->block->estimate->people = 'People'; +$lang->block->estimate->expect = 'Expect'; +$lang->block->estimate->consumed = 'Consumed'; +$lang->block->estimate->surplus = 'Surplus'; +$lang->block->estimate->hour = 'H'; + $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['project'] = $lang->projectCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index 3c1dcb940d..60b702edc5 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -693,6 +693,15 @@ $lang->block->teamachievement->consumedHours = 'Consumed Hours'; $lang->block->teamachievement->totalWorkload = 'Total Workload'; $lang->block->teamachievement->vs = 'VS'; +$lang->block->estimate = new stdclass(); +$lang->block->estimate->costs = 'Costs'; +$lang->block->estimate->workhour = 'Workhour'; +$lang->block->estimate->people = 'People'; +$lang->block->estimate->expect = 'Expect'; +$lang->block->estimate->consumed = 'Consumed'; +$lang->block->estimate->surplus = 'Surplus'; +$lang->block->estimate->hour = 'H'; + $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['project'] = $lang->projectCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 5cc1ccd3af..65cbf83d94 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -691,6 +691,15 @@ $lang->block->teamachievement->consumedHours = '消耗工时'; $lang->block->teamachievement->totalWorkload = '累计工作量'; $lang->block->teamachievement->vs = '较昨日'; +$lang->block->estimate = new stdclass(); +$lang->block->estimate->costs = '人工'; +$lang->block->estimate->workhour = '工时'; +$lang->block->estimate->people = '人'; +$lang->block->estimate->expect = '预计'; +$lang->block->estimate->consumed = '已消耗'; +$lang->block->estimate->surplus = '剩余'; +$lang->block->estimate->hour = 'H'; + $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['project'] = $lang->projectCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/ui/waterfallestimateblock.html.php b/module/block/ui/waterfallestimateblock.html.php new file mode 100644 index 0000000000..65e65f989b --- /dev/null +++ b/module/block/ui/waterfallestimateblock.html.php @@ -0,0 +1,68 @@ + +* @package block +* @link https://www.zentao.net +*/ + +namespace zin; + +blockPanel +( + div + ( + setClass('flex py-4'), + cell + ( + set::width('1/2'), + setClass('border-r'), + div($lang->block->estimate->costs), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->durationestimation->people . ' :'), + cell(setClass('ml-1'), ($people ? $people : 0) . ' ' . $lang->block->estimate->people) + ), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->durationestimation->members . ' :'), + cell(setClass('ml-1'), ($members ? $members : 0) . ' ' . $lang->block->estimate->people) + ), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->workestimation->totalLaborCost . ' :'), + cell(setClass('ml-1'), '¥' . zget($budget, 'totalLaborCost', 0)) + ) + ), + cell + ( + set::width('1/2'), + setClass('px-4'), + div($lang->block->estimate->workhour), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->block->estimate->expect . ' :'), + cell(setClass('ml-1'), zget($budget, 'duration', 0) . ' ' . $lang->block->estimate->hour) + ), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->block->estimate->consumed . ' :'), + cell(setClass('ml-1'), ($consumed ? $consumed : 0) . ' ' . $lang->block->estimate->hour) + ), + div + ( + setClass('flex py-4 text-gray'), + cell(set::width('1/2'), setClass('text-right'), $lang->block->estimate->surplus . ' :'), + cell(setClass('ml-1'), ($totalLeft ? $totalLeft : 0) . ' ' . $lang->block->estimate->hour) + ) + ) + ) +);