mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-22 10:26:56 +08:00
fixbugs
This commit is contained in:
@@ -78,10 +78,11 @@
|
||||
vi /etc/supervisor/conf.d/rpadmin.conf
|
||||
|
||||
[program:RootPanel]
|
||||
command=node /home/rpadmin/RootPanel/start.js
|
||||
autorestart=true
|
||||
command = coffee /home/rpadmin/RootPanel/app.coffee
|
||||
directory = /home/rpadmin/RootPanel
|
||||
autorestart = true
|
||||
redirect_stderr = true
|
||||
user=rpadmin
|
||||
user = rpadmin
|
||||
|
||||
service nginx restart
|
||||
service mongodb restart
|
||||
|
||||
@@ -35,7 +35,7 @@ CouponCode = mongoose.Schema
|
||||
CouponCode.plugin mongooseUniqueValidator,
|
||||
message: 'unique_validation_error'
|
||||
|
||||
exports.coupons_meta = coupons_meta =
|
||||
config.coupons_meta = coupons_meta =
|
||||
amount:
|
||||
validate: (account, coupon, callback) ->
|
||||
apply_log = _.find coupon.apply_log, (item) ->
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{express, async, _} = app.libs
|
||||
{requireAdminAuthenticate} = app.middleware
|
||||
{Account, Ticket, Financials, CouponCode} = app.models
|
||||
{config} = app
|
||||
|
||||
module.exports = exports = express.Router()
|
||||
|
||||
@@ -10,7 +11,7 @@ exports.get '/', (req, res) ->
|
||||
Account.find {}, (err, accounts) ->
|
||||
return res.render 'admin',
|
||||
accounts: accounts
|
||||
coupon_code_types: _.keys CouponCode.coupons_meta
|
||||
coupon_code_types: _.keys config.coupons_meta
|
||||
|
||||
exports.get '/ticket', (req, res) ->
|
||||
LIMIT = 10
|
||||
|
||||
@@ -8,9 +8,7 @@ $ ->
|
||||
$('.action-use').click ->
|
||||
code = $('.form-coupon .input-coupon_code').val()
|
||||
|
||||
request '/coupon/info',
|
||||
code: code
|
||||
, (result) ->
|
||||
request "/coupon/info?code=#{code}", {}, {method: 'get'}, (result) ->
|
||||
if window.confirm result.message
|
||||
request '/coupon/apply',
|
||||
code: code
|
||||
|
||||
@@ -8,9 +8,3 @@
|
||||
text-align: right;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
a.btn {
|
||||
width: 90px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<hr />
|
||||
|
||||
Created by <%= account.username %> at <%= ticket.created_at %>, View ticket:
|
||||
<a href='<%= config.web.url %>/ticket/view/?id=<%= ticket._id %>'><%= ticket._id %></a>
|
||||
<a href='<%= config.web.url %>/ticket/view/<%= ticket._id %>'><%= ticket._id %></a>
|
||||
<br />
|
||||
Notice from <%= t(config.web.t_name) %>.
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<hr />
|
||||
|
||||
Replied by <%= account.username %> at <%= reply.created_at %>, View ticket:
|
||||
<a href='<%= config.web.url %>/ticket/view/?id=<%= ticket._id %>'><%= ticket._id %></a>
|
||||
<a href='<%= config.web.url %>/ticket/view/<%= ticket._id %>'><%= ticket._id %></a>
|
||||
<br />
|
||||
Notice from <%= t(config.web.t_name) %>.
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports =
|
||||
plans:
|
||||
sample:
|
||||
t_name: 'plans.sample.name'
|
||||
t_description: 'plans.sample.name.description'
|
||||
t_description: 'plans.sample.description'
|
||||
|
||||
billing_by_time:
|
||||
unit: 24 * 3600 * 1000
|
||||
|
||||
Reference in New Issue
Block a user