* add vision for todo and tweak todo create to set vision, part of task #47905.

This commit is contained in:
Wenrui LI
2022-01-25 14:03:24 +08:00
parent 53478d7b9e
commit 30f61c2acc
6 changed files with 20 additions and 0 deletions
+1
View File
@@ -12,3 +12,4 @@ ALTER TABLE `zt_action` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `r
ALTER TABLE `zt_searchindex` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `title`;
ALTER TABLE `zt_config` ADD `vision` varchar(10) NOT NULL DEFAULT '' AFTER `id`;
ALTER TABLE `zt_config` DROP INDEX `unique`, ADD UNIQUE `unique` (`vision`,`owner`,`module`,`section`,`key`);
ALTER TABLE `zt_todo` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `deleted`;
+1
View File
@@ -1555,6 +1555,7 @@ CREATE TABLE IF NOT EXISTS `zt_todo` (
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL default '0',
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `assignedTo` (`assignedTo`),
@@ -3,3 +3,8 @@ $('.block-project table > thead > tr > th:last-child').remove();
$('.block-project table > tbody > tr > td:last-child').remove();
$('.block-scrumtest').remove();
</script>
<?php if($code == 'list' && $module == 'todo'):?>
<script>
$('form[action*="todo"] button.btn-primary').parent().append('<input type="hidden" name="vision" id="vision" value="lite">');
</script>
<?php endif;?>
@@ -0,0 +1,6 @@
<script>
$(function()
{
for(var index = 0; index <= 9; index++) $('#todoBatchAddForm').append(`<input type="hidden" name="vision[${index}]" id="vision[${index}]" value="lite">`);
});
</script>
@@ -0,0 +1,6 @@
<script>
$(function()
{
$('#submit').parent().append('<input type="hidden" name="vision" id="vision" value="lite">');
});
</script>
+1
View File
@@ -175,6 +175,7 @@ class todoModel extends model
$todo->assignedTo = $this->app->user->account;
$todo->assignedBy = $this->app->user->account;
$todo->assignedDate = $now;
$todo->vision = $todos->vision[$i];
if(in_array($todo->type, $this->config->todo->moduleList)) $todo->idvalue = isset($todos->{$this->config->todo->objectList[$todo->type]}[$i + 1]) ? $todos->{$this->config->todo->objectList[$todo->type]}[$i + 1] : 0;