Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
4e80d7f9
Commit
4e80d7f9
authored
May 31, 2016
by
Juorder Antonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow all user to buy mailboxes and watch their buttons
parent
a7092ea2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
140 deletions
+128
-140
domain_mailbox_plans.jsx
src/components/domain/domain_mailbox_plans.jsx
+7
-14
create_mailbox.jsx
src/components/mailbox/create_mailbox.jsx
+13
-16
edit_mailbox.jsx
src/components/mailbox/edit_mailbox.jsx
+108
-110
No files found.
src/components/domain/domain_mailbox_plans.jsx
View file @
4e80d7f9
...
@@ -7,7 +7,6 @@ import MessageBar from '../message_bar.jsx';
...
@@ -7,7 +7,6 @@ import MessageBar from '../message_bar.jsx';
import
Panel
from
'../panel.jsx'
;
import
Panel
from
'../panel.jsx'
;
import
ZimbraStore
from
'../../stores/zimbra_store.jsx'
;
import
ZimbraStore
from
'../../stores/zimbra_store.jsx'
;
import
UserStore
from
'../../stores/user_store.jsx'
;
import
*
as
Utils
from
'../../utils/utils.jsx'
;
import
*
as
Utils
from
'../../utils/utils.jsx'
;
...
@@ -48,7 +47,13 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -48,7 +47,13 @@ export default class DomainMailboxPlans extends React.Component {
}
}
const
headerButtons
=
[
const
headerButtons
=
[
{
label
:
'Comprar Casillas'
,
props
:
{
className
:
'btn btn-info btn-xs'
,
onClick
:
(
e
)
=>
Utils
.
handleLink
(
e
,
`/sales/
${
this
.
props
.
params
.
id
}
/mailboxes`
,
this
.
props
.
location
)
}
},
{
{
label
:
'Ver casillas'
,
label
:
'Ver casillas'
,
props
:
{
props
:
{
...
@@ -65,18 +70,6 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -65,18 +70,6 @@ export default class DomainMailboxPlans extends React.Component {
}
}
];
];
if
(
UserStore
.
isGlobalAdmin
())
{
headerButtons
.
unshift
(
{
label
:
'Comprar Casillas'
,
props
:
{
className
:
'btn btn-info btn-xs'
,
onClick
:
(
e
)
=>
Utils
.
handleLink
(
e
,
`/sales/
${
this
.
props
.
params
.
id
}
/mailboxes`
,
this
.
props
.
location
)
}
}
);
}
const
mailboxPlans
=
[];
const
mailboxPlans
=
[];
let
panelBody
=
null
;
let
panelBody
=
null
;
const
cos
=
Utils
.
getEnabledPlansByCosId
(
ZimbraStore
.
getAllCos
());
const
cos
=
Utils
.
getEnabledPlansByCosId
(
ZimbraStore
.
getAllCos
());
...
...
src/components/mailbox/create_mailbox.jsx
View file @
4e80d7f9
...
@@ -14,7 +14,6 @@ import EventStore from '../../stores/event_store.jsx';
...
@@ -14,7 +14,6 @@ import EventStore from '../../stores/event_store.jsx';
import
MailboxStore
from
'../../stores/mailbox_store.jsx'
;
import
MailboxStore
from
'../../stores/mailbox_store.jsx'
;
import
DomainStore
from
'../../stores/domain_store.jsx'
;
import
DomainStore
from
'../../stores/domain_store.jsx'
;
import
ZimbraStore
from
'../../stores/zimbra_store.jsx'
;
import
ZimbraStore
from
'../../stores/zimbra_store.jsx'
;
import
UserStore
from
'../../stores/user_store.jsx'
;
import
Constants
from
'../../utils/constants.jsx'
;
import
Constants
from
'../../utils/constants.jsx'
;
...
@@ -298,23 +297,21 @@ export default class CreateMailBox extends React.Component {
...
@@ -298,23 +297,21 @@ export default class CreateMailBox extends React.Component {
});
});
}
}
if
(
UserStore
.
isGlobalAdmin
())
{
const
options
=
{
const
options
=
{
title
:
'Comprar Casilla'
,
title
:
'Comprar Casilla'
,
text
:
`Por ahora no tienes más cupo para crear una casilla tipo <strong>
${
Utils
.
titleCase
(
data
.
plan
)}
</strong>, ¿Deseas comprar más?`
,
text
:
`Por ahora no tienes más cupo para crear una casilla tipo <strong>
${
Utils
.
titleCase
(
data
.
plan
)}
</strong>, ¿Deseas comprar más?`
,
html
:
true
,
html
:
true
,
confirmButtonText
:
'Si, compraré'
confirmButtonText
:
'Si, compraré'
};
};
return
Utils
.
alertToBuy
((
isConfirmed
)
=>
{
return
Utils
.
alertToBuy
((
isConfirmed
)
=>
{
if
(
isConfirmed
)
{
if
(
isConfirmed
)
{
const
{
id
}
=
this
.
cacheDomain
;
const
{
id
}
=
this
.
cacheDomain
;
if
(
id
)
{
if
(
id
)
{
return
Utils
.
handleLink
(
null
,
`/sales/
${
id
}
/mailboxes`
);
return
Utils
.
handleLink
(
null
,
`/sales/
${
id
}
/mailboxes`
);
}
}
}
}
,
options
);
}
}
}
,
options
);
}
}
getAllDomains
()
{
getAllDomains
()
{
...
...
src/components/mailbox/edit_mailbox.jsx
View file @
4e80d7f9
This diff is collapsed.
Click to expand it.
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