Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Sang D NGO
linagora.esn.most
Commits
9a367cee
Commit
9a367cee
authored
Apr 13, 2018
by
Sang D NGO
Browse files
show proposal by status
parent
a603a16b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
15 deletions
+27
-15
backend/webserver/api/proposals/controller.js
backend/webserver/api/proposals/controller.js
+1
-0
frontend/app/app.router.js
frontend/app/app.router.js
+5
-9
frontend/app/proposal/list/item/most-proposal-list-item.pug
frontend/app/proposal/list/item/most-proposal-list-item.pug
+2
-2
frontend/app/proposal/most-proposal.controller.js
frontend/app/proposal/most-proposal.controller.js
+5
-2
frontend/app/sidebar/most-sidebar.pug
frontend/app/sidebar/most-sidebar.pug
+14
-2
No files found.
backend/webserver/api/proposals/controller.js
View file @
9a367cee
...
...
@@ -39,6 +39,7 @@ module.exports = function(dependencies, lib) {
var
listOptions
=
{
creator
:
req
.
user
.
id
,
type
:
req
.
query
.
type
,
status
:
req
.
query
.
status
,
limit
:
Number
(
req
.
query
.
limit
),
offset
:
Number
(
req
.
query
.
offset
)
};
...
...
frontend/app/app.router.js
View file @
9a367cee
...
...
@@ -6,20 +6,16 @@
angular
.
module
(
MODULE_NAME
)
.
config
(
function
(
$stateProvider
)
{
.
config
(
function
(
$stateProvider
,
$urlRouterProvider
)
{
$urlRouterProvider
.
when
(
'
/most
'
,
'
/most/proposal
'
);
$stateProvider
.
state
(
'
most
'
,
{
url
:
'
/most
'
,
templateUrl
:
MODULE_DIR_NAME
+
'
/app/app.html
'
,
deepStateRedirect
:
{
default
:
'
most.proposal
'
,
fn
:
function
()
{
return
true
;
}
}
templateUrl
:
MODULE_DIR_NAME
+
'
/app/app.html
'
})
.
state
(
'
most.proposal
'
,
{
url
:
'
/proposal
'
,
url
:
'
/proposal
?status
'
,
views
:
{
'
root@most
'
:
{
template
:
'
<most-proposal />
'
...
...
frontend/app/proposal/list/item/most-proposal-list-item.pug
View file @
9a367cee
...
...
@@ -8,8 +8,8 @@
.col-xs-2
div(ng-switch="$ctrl.proposal.status")
span.text-muted(ng-switch-when="PENDING") Đang chờ
span.c-orange(ng-switch-when="REVIEWING") Đang x
em xét
span.c-green(ng-switch-when="ACCEPTED") Đã
chấp nhận
span.c-orange(ng-switch-when="REVIEWING") Đang x
ử lý
span.c-green(ng-switch-when="ACCEPTED") Đã
thông qua
span.c-red(ng-switch-when="REJECTED") Đã từ chối
.lv-actions.actions
a(href="", data-toggle="dropdown", aria-expanded="false")
...
...
frontend/app/proposal/most-proposal.controller.js
View file @
9a367cee
...
...
@@ -4,7 +4,10 @@
angular
.
module
(
'
linagora.esn.most
'
)
.
controller
(
'
MostProposalController
'
,
MostProposalController
);
function
MostProposalController
(
mostProposalApiClient
)
{
function
MostProposalController
(
$stateParams
,
mostProposalApiClient
)
{
var
self
=
this
;
self
.
$onInit
=
$onInit
;
...
...
@@ -12,7 +15,7 @@
function
$onInit
()
{
self
.
status
=
'
loading
'
;
mostProposalApiClient
.
getProposals
().
then
(
function
(
proposals
)
{
mostProposalApiClient
.
getProposals
(
{
status
:
$stateParams
.
status
}
).
then
(
function
(
proposals
)
{
self
.
status
=
'
loaded
'
;
self
.
proposals
=
proposals
;
});
...
...
frontend/app/sidebar/most-sidebar.pug
View file @
9a367cee
...
...
@@ -4,6 +4,18 @@
ul.nav.nav-pills.nav-stacked
.listview
.lv-body
a.lv-item.menu-item(href="", ui-sref="most.proposal", ui-sref-active="selected")
a.lv-item.menu-item(href="", ui-sref="most.proposal
({ status: '' })
", ui-sref-active="selected")
i.mdi.mdi-file
.menu-title #{__('Proposals')}
.menu-title #{__('Tất cả')}
a.lv-item.menu-item(href="", ui-sref="most.proposal({ status: 'PENDING' })", ui-sref-active="selected")
i.mdi.mdi-file
.menu-title #{__('Chờ xét duyệt')}
a.lv-item.menu-item(href="", ui-sref="most.proposal({ status: 'REVIEWING' })", ui-sref-active="selected")
i.mdi.mdi-file
.menu-title #{__('Đang xử lý')}
a.lv-item.menu-item(href="", ui-sref="most.proposal({ status: 'ACCEPTED' })", ui-sref-active="selected")
i.mdi.mdi-file
.menu-title #{__('Đã thông qua')}
a.lv-item.menu-item(href="", ui-sref="most.proposal({ status: 'REJECTED' })", ui-sref-active="selected")
i.mdi.mdi-file
.menu-title #{__('Đã từ chối')}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment