mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes for referral codes
This commit is contained in:
parent
f57c064d26
commit
93ab5480a6
@ -71,7 +71,8 @@ class CreateAccount
|
||||
$sp794f3f = new Account();
|
||||
$sp794f3f->fill($this->request);
|
||||
|
||||
$sp794f3f->referral_code = Str::random(32);
|
||||
if(array_key_exists('rc', $this->request))
|
||||
$sp794f3f->referral_code = $this->request['rc'];
|
||||
|
||||
if (! $sp794f3f->key) {
|
||||
$sp794f3f->key = Str::random(32);
|
||||
|
@ -28,6 +28,9 @@ class Account extends BaseModel
|
||||
use PresentableTrait;
|
||||
use MakesHash;
|
||||
|
||||
private $free_plan_email_quota = 250;
|
||||
|
||||
private $paid_plan_email_quota = 500;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -347,9 +350,15 @@ class Account extends BaseModel
|
||||
|
||||
public function getDailyEmailLimit()
|
||||
{
|
||||
$limit = config('ninja.daily_email_limit');
|
||||
|
||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
||||
if($this->isPaid()){
|
||||
$limit = $this->paid_plan_email_quota;
|
||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
||||
}
|
||||
else{
|
||||
$limit = $this->free_plan_email_quota;
|
||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
||||
}
|
||||
|
||||
return min($limit, 5000);
|
||||
}
|
||||
|
13287
package-lock.json
generated
13287
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,7 @@
|
||||
"card-validator": "^6.2.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"jsignature": "^2.1.3",
|
||||
"json-formatter-js": "^2.3.4",
|
||||
"laravel-mix": "^5.0.9",
|
||||
"linkify-urls": "^3.1.1",
|
||||
"lodash": "^4.17.21",
|
||||
|
194
public/js/jsformatter.css
vendored
Normal file
194
public/js/jsformatter.css
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
.json-formatter-row {
|
||||
font-family: monospace;
|
||||
}
|
||||
.json-formatter-row,
|
||||
.json-formatter-row a,
|
||||
.json-formatter-row a:hover {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
.json-formatter-row .json-formatter-row {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.json-formatter-row .json-formatter-children.json-formatter-empty {
|
||||
opacity: 0.5;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
||||
display: none;
|
||||
}
|
||||
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
||||
content: "No properties";
|
||||
}
|
||||
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
||||
content: "[]";
|
||||
}
|
||||
.json-formatter-row .json-formatter-string,
|
||||
.json-formatter-row .json-formatter-stringifiable {
|
||||
color: green;
|
||||
white-space: pre;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.json-formatter-row .json-formatter-number {
|
||||
color: blue;
|
||||
}
|
||||
.json-formatter-row .json-formatter-boolean {
|
||||
color: red;
|
||||
}
|
||||
.json-formatter-row .json-formatter-null {
|
||||
color: #855A00;
|
||||
}
|
||||
.json-formatter-row .json-formatter-undefined {
|
||||
color: #ca0b69;
|
||||
}
|
||||
.json-formatter-row .json-formatter-function {
|
||||
color: #FF20ED;
|
||||
}
|
||||
.json-formatter-row .json-formatter-date {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.json-formatter-row .json-formatter-url {
|
||||
text-decoration: underline;
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
}
|
||||
.json-formatter-row .json-formatter-bracket {
|
||||
color: blue;
|
||||
}
|
||||
.json-formatter-row .json-formatter-key {
|
||||
color: #00008B;
|
||||
padding-right: 0.2rem;
|
||||
}
|
||||
.json-formatter-row .json-formatter-toggler-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.json-formatter-row .json-formatter-toggler {
|
||||
line-height: 1.2rem;
|
||||
font-size: 0.7rem;
|
||||
vertical-align: middle;
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
padding-right: 0.2rem;
|
||||
}
|
||||
.json-formatter-row .json-formatter-toggler:after {
|
||||
display: inline-block;
|
||||
transition: transform 100ms ease-in;
|
||||
content: "►";
|
||||
}
|
||||
.json-formatter-row > a > .json-formatter-preview-text {
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s ease-in;
|
||||
font-style: italic;
|
||||
}
|
||||
.json-formatter-row:hover > a > .json-formatter-preview-text {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
||||
display: inline-block;
|
||||
}
|
||||
.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
||||
display: none;
|
||||
}
|
||||
.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
||||
display: block;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row {
|
||||
font-family: monospace;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row,
|
||||
.json-formatter-dark.json-formatter-row a,
|
||||
.json-formatter-dark.json-formatter-row a:hover {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-row {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {
|
||||
opacity: 0.5;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
||||
display: none;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
||||
content: "No properties";
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
||||
content: "[]";
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-string,
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {
|
||||
color: #31F031;
|
||||
white-space: pre;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-number {
|
||||
color: #66C2FF;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-boolean {
|
||||
color: #EC4242;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-null {
|
||||
color: #EEC97D;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-undefined {
|
||||
color: #ef8fbe;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-function {
|
||||
color: #FD48CB;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-date {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-url {
|
||||
text-decoration: underline;
|
||||
color: #027BFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-bracket {
|
||||
color: #9494FF;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-key {
|
||||
color: #23A0DB;
|
||||
padding-right: 0.2rem;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-toggler {
|
||||
line-height: 1.2rem;
|
||||
font-size: 0.7rem;
|
||||
vertical-align: middle;
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
padding-right: 0.2rem;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {
|
||||
display: inline-block;
|
||||
transition: transform 100ms ease-in;
|
||||
content: "►";
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s ease-in;
|
||||
font-style: italic;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
||||
display: inline-block;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
||||
display: none;
|
||||
}
|
||||
.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
||||
display: block;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user