Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1680 [Control] add: mass control #1864

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
72dbe90
add multi object control
theodaviddd Aug 7, 2024
b1c76bd
#1680 [Control] add: multi control data model
theodaviddd Aug 13, 2024
610c325
#1680 [Control] add: multi control list template
theodaviddd Aug 13, 2024
0980076
#1680 [Control] add: mass control management
theodaviddd Aug 13, 2024
24b3947
#1680 [Control] add: control answers & lock
theodaviddd Aug 13, 2024
5d3133f
#1680 [Control] add: controlled object on mass control list
theodaviddd Aug 13, 2024
4159a25
add: save answers button in modal
evarisk-theo Aug 20, 2024
df7cb27
add multi sheets on control form
evarisk-theo Aug 20, 2024
449d88a
add: add controls to control
evarisk-theo Aug 20, 2024
c0b799b
fix: mass signature
theodaviddd Aug 20, 2024
5123119
fix: action clone
theodaviddd Aug 20, 2024
dde45a6
fix: lock button & js
theodaviddd Aug 16, 2024
da0ed00
fix: workflow
theodaviddd Aug 16, 2024
26b1fde
add: document on list
theodaviddd Aug 16, 2024
4f5ad2a
fix: prevent user from clicking if control is locked
theodaviddd Aug 16, 2024
805b7ec
fix: questions answering
theodaviddd Aug 27, 2024
d624f86
fix: avoid sub controls edition if main control is validated
theodaviddd Aug 27, 2024
26fe14b
fix: show parent control
theodaviddd Aug 27, 2024
2521f83
add: document management
lmag Aug 15, 2024
6d41b05
fix: prevent saving sub control from disabling main control validate …
theodaviddd Sep 3, 2024
6691f09
#1680 [Control] fix: loader on selected answer only
theodaviddd Sep 3, 2024
5bdd7f6
#1680 [Control] fix: change variables from masscontrol to maincontro…
theodaviddd Sep 3, 2024
1b62bc3
#1680 [Control] fix: verdict update if null
theodaviddd Sep 3, 2024
53cb95e
Auto stash before rebase of "add_multi_objects_controls"
theodaviddd Sep 3, 2024
64d3b3b
#1680 [Control] fix: minor typo & syntax changes
theodaviddd Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#1680 [Control] add: multi control data model
theodaviddd committed Sep 3, 2024
commit b1c76bd263381858767b83964f4c0ccf852914a6
12 changes: 12 additions & 0 deletions class/control.class.php
Original file line number Diff line number Diff line change
@@ -128,6 +128,8 @@ class Control extends SaturneObject
'verdict' => ['type' => 'smallint', 'label' => 'Verdict', 'enabled' => 1, 'position' => 110, 'notnull' => 0, 'visible' => 5, 'showinpwa' => 1, 'index' => 1, 'positioncard' => 20, 'arrayofkeyval' => [0 => '', 1 => 'OK', 2 => 'KO', 3 => 'N/A']],
'photo' => ['type' => 'text', 'label' => 'Photo', 'enabled' => 1, 'position' => 120, 'notnull' => 0, 'visible' => 0, 'showinpwa' => 0],
'track_id' => ['type' => 'text', 'label' => 'TrackID', 'enabled' => 1, 'position' => 125, 'notnull' => 0, 'visible' => 2, 'showinpwa' => 0],
'mass_control' => ['type' => 'boolean', 'label' => 'MassControl', 'enabled' => 1, 'position' => 126, 'notnull' => 0, 'visible' => 0, 'showinpwa' => 0],
'fk_control' => ['type' => 'integer:Control:digiquali/class/control.class.php', 'label' => 'Control', 'picto' => 'control', 'enabled' => 1, 'position' => 127, 'notnull' => 0, 'visible' => 0, 'showinpwa' => 0, 'foreignkey' => 'digiquali_control.rowid'],
'fk_user_creat' => ['type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'picto' => 'user', 'enabled' => 1, 'position' => 130, 'notnull' => 1, 'visible' => 0, 'showinpwa' => 0, 'foreignkey' => 'user.rowid'],
'fk_user_modif' => ['type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'picto' => 'user', 'enabled' => 1, 'position' => 140, 'notnull' => 0, 'visible' => 0, 'showinpwa' => 0, 'foreignkey' => 'user.rowid'],
'fk_sheet' => ['type' => 'integer:Sheet:digiquali/class/sheet.class.php', 'label' => 'Sheet', 'picto' => 'fontawesome_fa-list_fas_#d35968', 'enabled' => 1, 'position' => 12, 'notnull' => 1, 'visible' => 5, 'showinpwa' => 0, 'index' => 1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'foreignkey' => 'digiquali_sheet.rowid'],
@@ -235,6 +237,16 @@ class Control extends SaturneObject
*/
public int $fk_sheet;

/**
* @var int Control ID.
*/
public $fk_control;

/**
* @var bool Mass control.
*/
public $mass_control;

/**
* @var int|string|null User ID.
*/
1 change: 1 addition & 0 deletions sql/control/llx_digiquali_control.key.sql
Original file line number Diff line number Diff line change
@@ -21,3 +21,4 @@ ALTER TABLE llx_digiquali_control ADD INDEX idx_digiquali_control_fk_user_contro
ALTER TABLE llx_digiquali_control ADD INDEX idx_digiquali_control_fk_projectid (projectid);
ALTER TABLE llx_digiquali_control ADD UNIQUE INDEX uk_digiquali_control_ref (ref, entity);
ALTER TABLE llx_digiquali_control ADD CONSTRAINT llx_digiquali_control_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
ALTER TABLE llx_digiquali_control ADD CONSTRAINT llx_digiquali_control_fk_control FOREIGN KEY (fk_control) REFERENCES llx_digiquali_control(rowid);
2 changes: 2 additions & 0 deletions sql/control/llx_digiquali_control.sql
Original file line number Diff line number Diff line change
@@ -32,6 +32,8 @@ CREATE TABLE llx_digiquali_control(
control_date datetime,
next_control_date datetime,
success_rate double(24,8),
mass_control boolean,
fk_control integer,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
fk_sheet integer NOT NULL,
5 changes: 5 additions & 0 deletions sql/update.sql
Original file line number Diff line number Diff line change
@@ -127,3 +127,8 @@ ALTER TABLE `llx_digiquali_survey` ADD `success_rate` DOUBLE(24,8) NULL AFTER `p

-- 1.13.0
ALTER TABLE `llx_digiquali_control` ADD `label` VARCHAR(255) NULL AFTER `status`;

-- 1.14.0
ALTER TABLE `llx_digiquali_control` ADD `mass_control` BOOLEAN NULL AFTER `success_rate`;
ALTER TABLE `llx_digiquali_control` ADD `fk_control` INTEGER NULL AFTER `mass_control`;
ALTER TABLE llx_digiquali_control ADD CONSTRAINT llx_digiquali_control_fk_control FOREIGN KEY (fk_control) REFERENCES llx_digiquali_control(rowid);