-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnote.txt
613 lines (508 loc) · 16.9 KB
/
note.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
Task
1. Your bdc orders/fx orders and loan tables don't have a column for the userid that created the entries. Please let's rectify this.
2. Also, on the bdc orders, include a column for bdc company, which would be either Donnette or Sebastian
3. Create a new role on Loans, call it, Risk Viewer, they're in Risk Management Department, can only view loans in that department but cannot do anything else, can't assign to anybody else. Unless the loan is 3 million or less
4. Also remove the audit department from the loan process, they don't add any value.
- Okay, let's include this and also a column for payment type and payment destination
That is for sale and purchases.
- Payment type is cash or account transfer
- Payment destination is cash or bank account it was paid to
{
"loan_amount": "",
"repayment_frequency": "",
"monthly_repayment_amount":"",
"maturity_tenor": "",
"collateral_offered": "",
"loan_purpose": "",
"bank_id": "",
"account_number": "",
"bvn": "",
"account_name": "",
}
get() {return parseFloat(this.getDataValue('monthly_income'));},
APPLICANT
---
{
"name": "Arianna Murphy",
"title": "Mrs",
"date_of_birth": "1963-11-26",
"gender": "female",
"marital_status": "single",
"home_address": "17a Dele Adedeji Street, Off Bisola Durosinmi-Etti Street, Lekki Phase I -Lagos",
"landmark": "Lekki Phase I",
"religion": "Christian",
"place_of_worship": "The Redeemed Christian Church of God",
"mother_maiden_name": "Sharon",
"email_address": "lynch.albin@neocede.ml",
"place_of_issuance": "Lagos",
"bvn": "783022293022", // unique/index
"id_card_number": "5121758683030098",
"date_issued": "2017-08-12",
"expiry_date_issued": "2020-09-23",
"identity_type_id": 3,
"spouse_name": "Mr Murphy Anthony",
"spouse_phone_number": "07045515280",
"spouse_occupation_id": 1,
"education_id": 5,
"occupation_id": 1,
"lga_id": 503,
"place_of_birth_id": 25
}
applicant_phone
[{
"applicant_id": ,
"type": [Mobile, Landline, Other],
"phone_number": "08145515280", // unique
}]
// bank
[{
"applicant_id": ,
"bank_id": 37,
"account_number": "0023091211", //index and unique
"account_name": "Jinadu Ewele David"
}]
[{
"applicant_id": "",
"name": "Canary Point Corporate Services",
"employment_type_id": 3,
"office_address": "17a Dele Adedeji Street, Off Bisola Durosinmi-Etti Street, Lekki Phase I -Lagos. Nigeria",
"activity": "Micro-finance banking",
"year_of_experience": 10,
"office_phone_no": "01-6329480",
"email_address": "info@canarypointcs.com",
"position": "Manager Directory",
"monthly_income": "1,230,200",
"monthly_expenses": "230,000"
}]
// loan application
{
"applicant_id": "",
"loan_amount": "7,000,000",
"repayment_frequency": "monthly",
"monthly_repayment_amount":"1,000,000",
"maturity_tenor": "1 year",
"collateral_offered": "Beautiful house in banana highland",
"purpose": "Increase production of cannabis in the east",
"repeat_loan": false,
"loan_source_id": 1,
"loan_type_id": 2,
"registration_status",
"require_approval"
"current_state_id"
"current_step_id"
"loan_source_id"
"business_id"
"tag",
"place_of_issuance" // <-- ask question on this.
"client_bank_id"
"created_at"
"updated_at"
"deleted_at"
}
/**
* Loan Application STEPS (Department)
* 1. NEW (LOAN_OFFICER)
* 2. LOAN_SUPERVISOR
* 3. RISK_MANAGEMENT
* 4. MD (MANAGING_DIRECTOR)
* 5. OPERATION
*
* Loan STATES
* 1. NEW
* 2. UPDATE_REQUIRED
* 3. IN_REVIEW
* 4. MD_APPROVAL
* 5. DISBURSEMENT
* 6. CLOSED
*
* LOAN LOGS
* loan_id: LoanApplicatn <-
* from: STATES
* to: STATES <-
* from_who: User
* to_who: User | null
* current_desk: STEPS <-
* timestamp: Date
* comment: text
*
* REGISTRATION STAGES
* 1. Stage 1 - Application & Spouse
* 2. Stage 2 - Business/Employment Detail
* 4. Stage 3 - Loan & Bank Details
* 5. Stage 4 - Upload required documents
*
*
* CHECKLIST
* Application form duly completed
* Valid ID Card i.e Driver's License, Voters Card, National ID, Intl Passport
* Passport picture of applicant affixed
* Credit Bureau report for applicant
* Credit Bureau report for business entity (if applicable)
* Evidence of business ownership (CAC Document, etc)
* Recent utility bill (3 months) electricity, water or waste bill
* Pictures of high value collateral items
* Supporting documents of residence or home ownership (if applicable)
* Relevant supporting documents of business (If applicable)
* Assessment form completed
*
* Co-Signor
* ===========
* Co-Signor Valid ID Card i.e Driver's License, Voters Card, National ID, Intl Passport
* Passport picture of Co-Signor affixed
* Evidence of Co-Signor's business ownership (if applicable)
* Credit Bureau report for Co-Signor
* Relevant supporting documents of business (if applicable)
*
* Guarantor
* ===========
* Guarantor Valid ID Card i.e Driver's License, Voters Card, National ID, Intl Passport
* Passport picture(s) of guarantor(s) affixed
* Credit Bureau report for guarantor(s)
* Evidence of guarantor(s) business ownership (if applicable)
* Guarantor Recent utility bill (3 months) electricity, water or waste bill
* Guarantor(s) Assessment form completed (if applicable)
*
* check_list_loan_app
* check_list_id
* loan_application_id
* doc_url
*
* [https://stackoverflow.com/questions/31579509/can-pm2-run-an-npm-start-script]
* [NODE_CONFIG_DIR=./src/configs pm2 start npm --name "dashboard-api-v1" -- run "start"]
*/
// complete loan app file Upload
// update fetch by dept,
// Loan update
1. Endpoint to fetch single loan application, what i have is GET all
2. Endpoint to fetch list of uploaded documents for each loan application
--no-warnings
/**
* invoice_no
* order_no
* check -> total
* status
* id
* INTERNAL_CONTROL
* message
*
* id
* FINANCE
* message
*
* id
* PROCESSED
* message
*
* step: Department
* 1. Relation Officer
2. Internal Control
3. Finance (Payout)
*/
/**
* Get loan applications by state
*/
static async getLoanAppByState(req, res) {
const { page, limit } = req.query;
const { state_id } = req.params;
const currentPage = parseInt(page) || 1;
const defaultLimit = parseInt(limit) || 20;
try {
const pagOptns = pagHandler(currentPage, defaultLimit);
const options = {
...pagOptns,
include: [
{ model: ClientSpouse, as: 'spouse' },
{ model: LoanType, as: 'loan_type' },
{ model: LoanState, as: 'current_state', where: { id: state_id } },
{ model: Department, as: 'current_step' },
{ model: Identification, as: 'identification' },
{ model: State, as: 'place_of_birth' },
{ model: Lga, as: 'lga' },
{ model: Occupation, as: 'occupation' },
{ model: Education, as: 'education' },
{ model: BusinessEmployment, as: 'business_employment' },
{ model: ClientBank, as: 'bank' },
{ model: LoanDetail, as: 'loan_detail' },
{ model: LoanLogs, as: 'logs' },
],
};
const loans = await LoanApplication.paginate(options);
util.setPagination(new Paginate(loans, currentPage, defaultLimit));
util.setSuccess(200, 'successful', loans.docs);
return util.send(res);
} catch (error) {
return util.setError(error.statusCode || 400, error.message).send(res);
}
}
/**
* Get loan applications by department
*/
static async getLoanAppByDept(req, res) {
const { page, limit } = req.query;
const { dept_id } = req.params;
const currentPage = parseInt(page) || 1;
const defaultLimit = parseInt(limit) || 20;
try {
const pagOptns = pagHandler(currentPage, defaultLimit);
const options = {
...pagOptns,
include: [
{ model: ClientSpouse, as: 'spouse' },
{ model: LoanState, as: 'current_state' },
{ model: Department, as: 'current_step', where: { id: dept_id } },
{ model: LoanType, as: 'loan_type' },
{ model: Identification },
{ model: Education, as: 'education' },
{ model: Occupation, as: 'occupation' },
{ model: State, as: 'place_of_birth' },
{ model: Lga, as: 'lga' },
{ model: BusinessEmployment, as: 'business_employment' },
{ model: LoanDetail, as: 'loan_detail' },
{ model: ClientBank, as: 'bank' },
{ model: LoanLogs, as: 'logs' },
],
};
const loans = await LoanApplication.paginate(options);
util.setPagination(new Paginate(loans, currentPage, defaultLimit));
util.setSuccess(200, 'successful', loans.docs);
return util.send(res);
} catch (error) {
return util.setError(error.statusCode || 400, error.message).send(res);
}
}
/**
* Get loan applications assigned to user
*/
static async getLoanAppAssignToUser(req, res) {
// const { user } = req;
const { user_id } = req.params;
const { page, limit } = req.query;
const currentPage = parseInt(page) || 1;
const defaultLimit = parseInt(limit) || 20;
try {
const user = await User.findByPk(user_id);
if (!user) throw new Error(`User with ID ${user_id} not found!`);
const pagOptns = pagHandler(currentPage, defaultLimit);
const options = {
...pagOptns,
include: [
{ model: ClientSpouse, as: 'spouse' },
{ model: LoanState, as: 'current_state' },
{ model: Department, as: 'current_step' },
{ model: LoanType, as: 'loan_type' },
{ model: Identification },
{ model: Education, as: 'education' },
{ model: Occupation, as: 'occupation' },
{ model: State, as: 'place_of_birth' },
{ model: Lga, as: 'lga' },
{ model: BusinessEmployment, as: 'business_employment' },
{ model: LoanDetail, as: 'loan_detail' },
{ model: ClientBank, as: 'bank' },
{ model: LoanLogs, as: 'logs', where: { id: user_id } },
],
};
const loans = await LoanApplication.paginate(options);
util.setPagination(new Paginate(loans, currentPage, defaultLimit));
util.setSuccess(200, 'successful', loans.docs);
return util.send(res);
} catch (error) {
return util.setError(error.statusCode || 400, error.message).send(res);
}
}
static async getAllLoanApplication(req, res) {
const { page, limit } = req.query;
try {
const currentPage = parseInt(page) || 1;
const defaultLimit = parseInt(limit) || 20;
const pagOptns = pagHandler(currentPage, defaultLimit, 'created_at');
const options = {
...pagOptns,
include: [
{
model: ClientSpouse,
as: 'spouse',
attributes: { exclude: ['occupation_id'] },
include: [{ model: Occupation, as: 'occupation' }],
},
{ model: LoanState, as: 'current_state' },
{ model: Department, as: 'current_step' },
{ model: LoanType, as: 'loan_type' },
{ model: Identification },
{ model: Education, as: 'education' },
{ model: Occupation, as: 'occupation' },
{ model: State, as: 'place_of_birth', attributes: ['id', 'name'] },
{ model: Lga, as: 'lga', attributes: { exclude: ['state_id'] } },
{
model: BusinessEmployment,
as: 'business_employment',
include: [{ model: BusinessEmploymentType, as: 'business_employment_type' }],
},
{ model: LoanDetail, as: 'loan_detail' },
{ model: ClientBank, as: 'bank' },
{ model: LoanLogs, as: 'logs' },
],
};
const loanApp = await LoanApplication.paginate(options);
util.setPagination(new Paginate(loanApp, currentPage, defaultLimit));
util.setSuccess(200, 'successful', loanApp.docs);
return util.send(res);
} catch (error) {
return util.setError(error.statusCode || 400, error.message).send(res);
}
}
/**
* You can only assign within the current department
* @param loan_id
* @method POST user_id
* Admin activity
*/
static async assignLoanToStaff(req, res) {
const { loan_id } = req.params;
try {
const payload = pick(req.body, ['assign_to']);
if (!payload.assign_to) throw new Error('Kind provide the user ID');
const loan = await LoanApplication.findOne({ where: { id: loan_id } });
if (!loan) throw new CustomError(`Loan application with ID ${loan_id} not found!`, 404);
if (loan.registration_status !== 'completed') {
throw new Error(`Loan application is still pending, please review and complete.`);
}
const CURRENT_STATE = loan.current_state.id;
const CURRENT_STAGE = loan.current_step.id;
const loanState = await LoanLogs.findOne({
where: { loan_id, to: CURRENT_STATE, desk: CURRENT_STAGE },
});
if (!loanState) throw new Error();
// check if user department belong current step
const user = await User.findOne({
where: { id: payload.user_id },
include: [{ model: Department, as: 'department', required: true }],
});
if (!user) throw new Error('User not found or not department attahed!');
if (user.department.id !== loan.current_step.id)
throw new Error("You can't assign to staff who is not in current department");
// update loan state
await loanState.update({ to_who: user.id }, {});
util.setSuccess(200, 'successful', {});
return util.send(res);
} catch (error) {
return util.setError(error.statusCode || 400, error.message).send(res);
}
}
/******************************************
FX Order
*******************************************/
Purchase deal slip
--------------------
- Date
- Customer Name
- Currency/Volume
- Exchange Rate
- Commission
- Amount/Naira Value
- Payment Mode: []
- Date
- Paying Bank
- Amount #
- Receiving Bank: BankDetail
- Beneficiary details: [BankDetail]
----------------------
Transfer Deal Slip
----------------------
- Deal Slip Number
- Reference Number
- Created Date
- Customers name
- Customers email
- Customers phone No
- Customer Address
- Purpose
- Currency/Volume
- Exchange rate
- Amount/Naira Value
- Bank charge
- Other charges
- Naira value
- Actual payment
- Payment mode/details (RECEIVABLES IN STANBIC)
- Name of Depositor (PARTPAYMENT PAID)
- Reference if any (USD PAID FROM GTB)
- Nature of beneficiary business
- Beneficiary: BankDetail
Bank Detail
- Bank Name
- Account Number
- Account Name
- Intermediary/correspondent Bank details
- Swift code
- Branch/Sort code
- Routing Number
- IBAN NUMBER
Transaction Type:
37607825
36466621
36834663
Jobs
=====
https://spotifyjobs.com/
https://www.builtinchicago.org/company/rise-buildings
https://recruitingbypaycor.com/career/JobIntroduction.action?clientId=8a7883c66a3387ef016a5183d6f11208&id=8a7885a873a1ff990173b53f858b28e0&source=&lang=en
https://www.diversifytech.co/job-board/software-development
https://www.collage.com/careers
https://aware3.com/careers/
https://jobs.lever.co/curology
https://jobs.lever.co/Readymetrics/bd3954e6-1f8e-4010-b9d8-a17abfdcd450
https://www.provi.com/careers
https://www.mmhmm.app/jobs/4767783002
https://jobs.cisco.com/jobs/ProjectDetail/Full-Stack-Software-Engineer-MFA-Duo-Security/1305753
https://happymoney.com/careers
https://jobs.lever.co/wealthfront?lever-via=nvw91fUz1T
https://jobs.lever.co/forto
Canada Jobs (Full stack)
https://athenasoftware.bamboohr.com/jobs/view.php?id=80
https://plexxis-software.breezy.hr/p/24fe9126fa9a-software-engineer-intermediate-to-senior-only
https://urbanlogiq.breezy.hr/p/b4459f4f4995-senior-software-engineer
// [
// sequelize.literal(`(
// SELECT loan_amount AS amount, loan_purpose AS purpose
// FROM loan_detail
// WHERE
// loan_detail.id = loans.loan_detail_id
// )`),
// 'loan_datail',
// ],
// 'status',
// 'type',
// 'loan_source_id',
// 'created_at',
[
(bytearray(b'3317bf1d-f381-4c24-845d-c7ec130033a4'), /id 0
'19449995', -> ref_no 1
b'Westcon group africa operations limnited', -> customer name 2
'buy', -> transaction_type 3
'EUR', -> currency 4
Decimal('4000.00'), -> volume_purchased 5
None, -> volume_sold 6
Decimal('510.00'), -> rate 7
'2040000.0000', -> total_amount_purchased 8
' - ', -> total_amount_sold 9
'both', -> mode_of_payment 10
'2500.00', -> cash_recieved 11
'', -> cash_paid 12
'', -> receiving_bank 13
'', -> paying_bank 14
datetime.datetime(2021, 7, 14, 21, 49, 3), -> created_at 15
'completed') -> status 16
]
(
'Euro', // name 0
'EUR', // locale 1
Decimal('4302500.00'), // stock_balance 2
Decimal('222500.00'), // opening_balance 3
Decimal('4302500.00'), // closing_balance 4
Decimal('0.00'), // volume_sold 5
Decimal('0.00'), // average_selling_rate 6
Decimal('510.00'), // average_purchase_rate 7
Decimal('-510.00'), // spread 8
Decimal('0.00'), // profit 9
datetime.datetime(2021, 7, 15, 1, 9, 59), // created_at 10
datetime.datetime(2021, 7, 15, 1, 9, 59)), // updated_at 11