- feat: remove unnecessary migrations, controllers and models files.

- feat: metable store
- feat: metable store with settings store.
- feat: settings middleware to auto-save and load.
- feat: DI db manager to master container.
- feat: write some logs to sale invoices.
This commit is contained in:
Ahmed Bouhuolia
2020-09-03 16:51:48 +02:00
parent abefba22ee
commit 9ee7ed89ec
98 changed files with 1697 additions and 2052 deletions

View File

@@ -0,0 +1,28 @@
import { Container, Inject } from 'typedi';
import AuthenticationService from '@/services/Authentication';
export default class WelcomeSMSJob {
@Inject()
authService: AuthenticationService;
/**
* Handle send welcome mail job.
* @param {Job} job
* @param {Function} done
*/
public async handler(job, done: Function): Promise<void> {
const { email, organizationName, firstName } = job.attrs.data;
const Logger = Container.get('logger');
Logger.info(`Send welcome SMS message - started: ${job.attrs.data}`);
try {
await this.authService.smsMessages.sendWelcomeMessage();
Logger.info(`Send welcome SMS message - finished: ${job.attrs.data}`);
done()
} catch (error) {
Logger.info(`Send welcome SMS message - error: ${job.attrs.data}, error: ${error}`);
done(error);
}
}
}