Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
dce231db
Verified
Commit
dce231db
authored
7 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FEAT
#58
History for baskets
parent
0f64a6a4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/basket/controllers/BasketController.php
+60
-1
60 additions, 1 deletion
src/app/basket/controllers/BasketController.php
src/core/lang/lang-en.php
+4
-0
4 additions, 0 deletions
src/core/lang/lang-en.php
src/core/lang/lang-fr.php
+4
-0
4 additions, 0 deletions
src/core/lang/lang-fr.php
with
68 additions
and
1 deletion
src/app/basket/controllers/BasketController.php
+
60
−
1
View file @
dce231db
...
...
@@ -19,6 +19,7 @@ use Action\models\ActionModel;
use
Core\Models\GroupModel
;
use
Core\Models\ServiceModel
;
use
Core\Models\ValidatorModel
;
use
History\controllers\HistoryController
;
use
Respect\Validation\Validator
;
use
Slim\Http\Request
;
use
Slim\Http\Response
;
...
...
@@ -78,6 +79,14 @@ class BasketController
$data
[
'isFolderBasket'
]
=
empty
(
$data
[
'isFolderBasket'
])
?
'N'
:
'Y'
;
$data
[
'flagNotif'
]
=
empty
(
$data
[
'flagNotif'
])
?
'N'
:
'Y'
;
BasketModel
::
create
(
$data
);
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$data
[
'id'
],
'eventType'
=>
'ADD'
,
'info'
=>
_BASKET_CREATION
.
" :
{
$data
[
'id'
]
}
"
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketCreation'
,
]);
return
$response
->
withJson
([
'basket'
=>
$data
[
'id'
]]);
}
...
...
@@ -112,6 +121,14 @@ class BasketController
$data
[
'flagNotif'
]
=
empty
(
$data
[
'flagNotif'
])
?
'N'
:
'Y'
;
$data
[
'id'
]
=
$aArgs
[
'id'
];
BasketModel
::
update
(
$data
);
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_BASKET_MODIFICATION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketModification'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
...
...
@@ -128,6 +145,14 @@ class BasketController
}
BasketModel
::
delete
([
'id'
=>
$aArgs
[
'id'
]]);
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'DEL'
,
'info'
=>
_BASKET_SUPPRESSION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketSuppression'
,
]);
return
$response
->
withJson
([
'baskets'
=>
BasketModel
::
get
()]);
}
...
...
@@ -210,6 +235,15 @@ class BasketController
BasketModel
::
updateOrder
([
'id'
=>
$basketToUpdate
,
'order'
=>
$key
+
1
]);
}
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_BASKETS_SORT_MODIFICATION
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketModification'
,
]);
$baskets
=
BasketModel
::
get
([
'select'
=>
[
'basket_id'
,
'basket_name'
,
'basket_desc'
,
'basket_order'
],
'where'
=>
[
'is_visible = ?'
],
...
...
@@ -364,6 +398,14 @@ class BasketController
}
}
}
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_BASKET_MODIFICATION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketModification'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
...
...
@@ -434,6 +476,14 @@ class BasketController
}
}
}
HistoryController
::
add
([
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_BASKET_MODIFICATION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketModification'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
...
...
@@ -450,11 +500,20 @@ class BasketController
}
BasketModel
::
deleteGroup
([
'id'
=>
$aArgs
[
'id'
],
'groupId'
=>
$aArgs
[
'groupId'
]]);
HistoryController
::
add
([
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
'tableName'
=>
'baskets'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_BASKET_MODIFICATION
.
" :
{
$aArgs
[
'id'
]
}
"
,
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
Florian Azizian
@florian.azizian
·
Feb 09, 2018
modifier libellé
modifier libellé
Please
register
or
sign in
to reply
'moduleId'
=>
'basket'
,
'eventId'
=>
'basketModification'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
private
static
function
checkGroupActions
(
array
$aArgs
)
{
private
static
function
checkGroupActions
(
array
$aArgs
)
{
ValidatorModel
::
notEmpty
(
$aArgs
,
[
'groupActions'
]);
ValidatorModel
::
arrayType
(
$aArgs
,
[
'groupActions'
]);
...
...
This diff is collapsed.
Click to expand it.
src/core/lang/lang-en.php
+
4
−
0
View file @
dce231db
...
...
@@ -12,6 +12,10 @@
* @author dev@maarch.org
*/
define
(
'_BASKETS_SORT_MODIFICATION'
,
'Baskets order modification'
);
define
(
'_BASKET_CREATION'
,
'Basket creation'
);
define
(
'_BASKET_MODIFICATION'
,
'Basket modification'
);
define
(
'_BASKET_SUPPRESSION'
,
'Basket suppression'
);
define
(
'_ENTITY_CREATION'
,
'Entity creation'
);
define
(
'_ENTITY_MODIFICATION'
,
'Entity modification'
);
define
(
'_ENTITY_SUPPRESSION'
,
'Entity suppression'
);
...
...
This diff is collapsed.
Click to expand it.
src/core/lang/lang-fr.php
+
4
−
0
View file @
dce231db
...
...
@@ -12,6 +12,10 @@
* @author dev@maarch.org
*/
define
(
'_BASKETS_SORT_MODIFICATION'
,
'Modification ordre bannettes'
);
define
(
'_BASKET_CREATION'
,
'Création bannette'
);
define
(
'_BASKET_MODIFICATION'
,
'Modification bannette'
);
define
(
'_BASKET_SUPPRESSION'
,
'Suppression bannette'
);
define
(
'_ENTITY_CREATION'
,
'Création entité'
);
define
(
'_ENTITY_MODIFICATION'
,
'Modification entité'
);
define
(
'_ENTITY_SUPPRESSION'
,
'Suppression entité'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment