Add precommit hooks

This commit is contained in:
Spencer Ofwiti
2021-06-15 16:37:33 +00:00
parent 5295e47cc1
commit 6a1ca3d4a0
72 changed files with 3365 additions and 23661 deletions

View File

@@ -1,7 +1,7 @@
import {Directive, HostListener, Input} from '@angular/core';
import { Directive, HostListener, Input } from '@angular/core';
@Directive({
selector: '[appRouterLink]'
selector: '[appRouterLink]',
})
// tslint:disable-next-line:directive-class-suffix
export class RouterLinkDirectiveStub {

View File

@@ -1,10 +1,10 @@
import {Component} from '@angular/core';
import { Component } from '@angular/core';
@Component({selector: 'app-sidebar', template: ''})
@Component({ selector: 'app-sidebar', template: '' })
export class SidebarStubComponent {}
@Component({selector: 'app-topbar', template: ''})
@Component({ selector: 'app-topbar', template: '' })
export class TopbarStubComponent {}
@Component({selector: 'app-footer', template: ''})
@Component({ selector: 'app-footer', template: '' })
export class FooterStubComponent {}

View File

@@ -2,7 +2,7 @@ export class TokenServiceStub {
getBySymbol(symbol: string): any {
return {
name: 'Reserve',
symbol: 'RSV'
symbol: 'RSV',
};
}
}

View File

@@ -1,4 +1,4 @@
import {Observable, of} from 'rxjs';
import { Observable, of } from 'rxjs';
export class TransactionServiceStub {
setTransaction(transaction: any, cacheSize: number): void {}

View File

@@ -1,12 +1,72 @@
import {Observable, of} from 'rxjs';
import { Observable, of } from 'rxjs';
export class UserServiceStub {
users = [
{id: 1, name: 'John Doe', phone: '+25412345678', address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865', type: 'user', created: '08/16/2020', balance: '12987', failedPinAttempts: 1, status: 'approved', bio: 'Bodaboda', gender: 'male'},
{id: 2, name: 'Jane Buck', phone: '+25412341234', address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865', type: 'vendor', created: '04/02/2020', balance: '56281', failedPinAttempts: 0, status: 'approved', bio: 'Groceries', gender: 'female'},
{id: 3, name: 'Mc Donald', phone: '+25498765432', address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865', type: 'group', created: '11/16/2020', balance: '450', failedPinAttempts: 2, status: 'unapproved', bio: 'Food', gender: 'male'},
{id: 4, name: 'Hera Cles', phone: '+25498769876', address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865', type: 'user', created: '05/28/2020', balance: '5621', failedPinAttempts: 3, status: 'approved', bio: 'Shop', gender: 'female'},
{id: 5, name: 'Silver Fia', phone: '+25462518374', address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865', type: 'token agent', created: '10/10/2020', balance: '817', failedPinAttempts: 0, status: 'unapproved', bio: 'Electronics', gender: 'male'},
{
id: 1,
name: 'John Doe',
phone: '+25412345678',
address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865',
type: 'user',
created: '08/16/2020',
balance: '12987',
failedPinAttempts: 1,
status: 'approved',
bio: 'Bodaboda',
gender: 'male',
},
{
id: 2,
name: 'Jane Buck',
phone: '+25412341234',
address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865',
type: 'vendor',
created: '04/02/2020',
balance: '56281',
failedPinAttempts: 0,
status: 'approved',
bio: 'Groceries',
gender: 'female',
},
{
id: 3,
name: 'Mc Donald',
phone: '+25498765432',
address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865',
type: 'group',
created: '11/16/2020',
balance: '450',
failedPinAttempts: 2,
status: 'unapproved',
bio: 'Food',
gender: 'male',
},
{
id: 4,
name: 'Hera Cles',
phone: '+25498769876',
address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865',
type: 'user',
created: '05/28/2020',
balance: '5621',
failedPinAttempts: 3,
status: 'approved',
bio: 'Shop',
gender: 'female',
},
{
id: 5,
name: 'Silver Fia',
phone: '+25462518374',
address: '0xc86ff893ac40d3950b4d5f94a9b837258b0a9865',
type: 'token agent',
created: '10/10/2020',
balance: '817',
failedPinAttempts: 0,
status: 'unapproved',
bio: 'Electronics',
gender: 'male',
},
];
actions = [
@@ -15,7 +75,13 @@ export class UserServiceStub {
{ id: 3, user: 'Will', role: 'superadmin', action: 'Reclaim RSV 1000', approval: true },
{ id: 4, user: 'Vivian', role: 'enroller', action: 'Complete user profile', approval: true },
{ id: 5, user: 'Jack', role: 'enroller', action: 'Reclaim RSV 200', approval: false },
{ id: 6, user: 'Patience', role: 'enroller', action: 'Change user information', approval: false }
{
id: 6,
user: 'Patience',
role: 'enroller',
action: 'Change user information',
approval: false,
},
];
getUserById(id: string): any {
@@ -30,7 +96,7 @@ export class UserServiceStub {
failedPinAttempts: 1,
status: 'approved',
bio: 'Bodaboda',
gender: 'male'
gender: 'male',
};
}
@@ -41,20 +107,17 @@ export class UserServiceStub {
key: {
ethereum: [
'0x51d3c8e2e421604e2b644117a362d589c5434739',
'0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D'
]
'0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D',
],
},
location: {
external: {},
latitude: '22.430670',
longitude: '151.002995'
longitude: '151.002995',
},
selling: [
'environment',
'health',
'transport'
],
vcard: 'QkVHSU46VkNBUkQNClZFUlNJT046My4wDQpFTUFJTDphYXJuZXNlbkBob3RtYWlsLmNvbQ0KRk46S3VydMKgS3JhbmpjDQpOOktyYW5qYztLdXJ0Ozs7DQpURUw7VFlQPUNFTEw6NjkyNTAzMzQ5ODE5Ng0KRU5EOlZDQVJEDQo='
selling: ['environment', 'health', 'transport'],
vcard:
'QkVHSU46VkNBUkQNClZFUlNJT046My4wDQpFTUFJTDphYXJuZXNlbkBob3RtYWlsLmNvbQ0KRk46S3VydMKgS3JhbmpjDQpOOktyYW5qYztLdXJ0Ozs7DQpURUw7VFlQPUNFTEw6NjkyNTAzMzQ5ODE5Ng0KRU5EOlZDQVJEDQo=',
});
}
@@ -64,7 +127,7 @@ export class UserServiceStub {
user: 'Tom',
role: 'enroller',
action: 'Disburse RSV 100',
approval: false
approval: false,
};
}
@@ -74,7 +137,7 @@ export class UserServiceStub {
user: 'Tom',
role: 'enroller',
action: 'Disburse RSV 100',
approval: true
approval: true,
};
}
}