mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: remove path alias.
feat: remove Webpack and depend on nodemon. feat: refactoring expenses. feat: optimize system users with caching. feat: architecture tenant optimize.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Service, Container, Inject } from 'typedi';
|
||||
import cryptoRandomString from 'crypto-random-string';
|
||||
import { times } from 'lodash';
|
||||
import { License } from "@/system/models";
|
||||
import { ILicense } from '@/interfaces';
|
||||
import LicenseMailMessages from '@/services/Payment/LicenseMailMessages';
|
||||
import LicenseSMSMessages from '@/services/Payment/LicenseSMSMessages';
|
||||
import { License } from "system/models";
|
||||
import { ILicense } from 'interfaces';
|
||||
import LicenseMailMessages from 'services/Payment/LicenseMailMessages';
|
||||
import LicenseSMSMessages from 'services/Payment/LicenseSMSMessages';
|
||||
|
||||
@Service()
|
||||
export default class LicenseService {
|
||||
@@ -27,8 +27,6 @@ export default class LicenseService {
|
||||
let licenseCode: string;
|
||||
let repeat: boolean = true;
|
||||
|
||||
console.log(License);
|
||||
|
||||
while(repeat) {
|
||||
licenseCode = cryptoRandomString({ length: 10, type: 'numeric' });
|
||||
const foundLicenses = await License.query().where('license_code', licenseCode);
|
||||
|
||||
@@ -13,7 +13,7 @@ export default class SubscriptionMailMessages {
|
||||
const Logger = Container.get('logger');
|
||||
const Mail = Container.get('mail');
|
||||
|
||||
const filePath = path.join(global.rootPath, 'views/mail/LicenseReceive.html');
|
||||
const filePath = path.join(global.__root, 'views/mail/LicenseReceive.html');
|
||||
const template = fs.readFileSync(filePath, 'utf8');
|
||||
const rendered = Mustache.render(template, { licenseCode });
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { License } from "@/system/models";
|
||||
import PaymentMethod from '@/services/Payment/PaymentMethod';
|
||||
import { Plan } from '@/system/models';
|
||||
import { IPaymentMethod, ILicensePaymentModel } from '@/interfaces';
|
||||
import { ILicensePaymentModel } from "@/interfaces";
|
||||
import { PaymentInputInvalid, PaymentAmountInvalidWithPlan } from '@/exceptions';
|
||||
import { License } from "system/models";
|
||||
import PaymentMethod from 'services/Payment/PaymentMethod';
|
||||
import { Plan } from 'system/models';
|
||||
import { IPaymentMethod, ILicensePaymentModel } from 'interfaces';
|
||||
import { ILicensePaymentModel } from "interfaces";
|
||||
import { PaymentInputInvalid, PaymentAmountInvalidWithPlan } from 'exceptions';
|
||||
|
||||
export default class LicensePaymentMethod extends PaymentMethod implements IPaymentMethod {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Container, Inject } from 'typedi';
|
||||
import SMSClient from '@/services/SMSClient';
|
||||
import SMSClient from 'services/SMSClient';
|
||||
|
||||
export default class SubscriptionSMSMessages {
|
||||
@Inject('SMSClient')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import moment from 'moment';
|
||||
import { IPaymentModel } from '@/interfaces';
|
||||
import { IPaymentModel } from 'interfaces';
|
||||
|
||||
export default class PaymentMethod implements IPaymentModel {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IPaymentMethod, IPaymentContext } from "@/interfaces";
|
||||
import { Plan } from '@/system/models';
|
||||
import { IPaymentMethod, IPaymentContext } from "interfaces";
|
||||
import { Plan } from 'system/models';
|
||||
|
||||
export default class PaymentContext<PaymentModel> implements IPaymentContext{
|
||||
paymentMethod: IPaymentMethod;
|
||||
|
||||
Reference in New Issue
Block a user