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

@@ -153,13 +153,19 @@
{ 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,
},
]</code>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="12" class="link-to-prism">src/testing/user-service-stub.ts:12</a></div>
<div class="io-line">Defined in <a href="" data-line="72" class="link-to-prism">src/testing/user-service-stub.ts:72</a></div>
</td>
</tr>
@@ -187,11 +193,71 @@
<tr>
<td class="col-md-4">
<i>Default value : </i><code>[
{id: 1, name: &#x27;John Doe&#x27;, phone: &#x27;+25412345678&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;user&#x27;, created: &#x27;08/16/2020&#x27;, balance: &#x27;12987&#x27;, failedPinAttempts: 1, status: &#x27;approved&#x27;, bio: &#x27;Bodaboda&#x27;, gender: &#x27;male&#x27;},
{id: 2, name: &#x27;Jane Buck&#x27;, phone: &#x27;+25412341234&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;vendor&#x27;, created: &#x27;04/02/2020&#x27;, balance: &#x27;56281&#x27;, failedPinAttempts: 0, status: &#x27;approved&#x27;, bio: &#x27;Groceries&#x27;, gender: &#x27;female&#x27;},
{id: 3, name: &#x27;Mc Donald&#x27;, phone: &#x27;+25498765432&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;group&#x27;, created: &#x27;11/16/2020&#x27;, balance: &#x27;450&#x27;, failedPinAttempts: 2, status: &#x27;unapproved&#x27;, bio: &#x27;Food&#x27;, gender: &#x27;male&#x27;},
{id: 4, name: &#x27;Hera Cles&#x27;, phone: &#x27;+25498769876&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;user&#x27;, created: &#x27;05/28/2020&#x27;, balance: &#x27;5621&#x27;, failedPinAttempts: 3, status: &#x27;approved&#x27;, bio: &#x27;Shop&#x27;, gender: &#x27;female&#x27;},
{id: 5, name: &#x27;Silver Fia&#x27;, phone: &#x27;+25462518374&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;token agent&#x27;, created: &#x27;10/10/2020&#x27;, balance: &#x27;817&#x27;, failedPinAttempts: 0, status: &#x27;unapproved&#x27;, bio: &#x27;Electronics&#x27;, gender: &#x27;male&#x27;},
{
id: 1,
name: &#x27;John Doe&#x27;,
phone: &#x27;+25412345678&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;user&#x27;,
created: &#x27;08/16/2020&#x27;,
balance: &#x27;12987&#x27;,
failedPinAttempts: 1,
status: &#x27;approved&#x27;,
bio: &#x27;Bodaboda&#x27;,
gender: &#x27;male&#x27;,
},
{
id: 2,
name: &#x27;Jane Buck&#x27;,
phone: &#x27;+25412341234&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;vendor&#x27;,
created: &#x27;04/02/2020&#x27;,
balance: &#x27;56281&#x27;,
failedPinAttempts: 0,
status: &#x27;approved&#x27;,
bio: &#x27;Groceries&#x27;,
gender: &#x27;female&#x27;,
},
{
id: 3,
name: &#x27;Mc Donald&#x27;,
phone: &#x27;+25498765432&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;group&#x27;,
created: &#x27;11/16/2020&#x27;,
balance: &#x27;450&#x27;,
failedPinAttempts: 2,
status: &#x27;unapproved&#x27;,
bio: &#x27;Food&#x27;,
gender: &#x27;male&#x27;,
},
{
id: 4,
name: &#x27;Hera Cles&#x27;,
phone: &#x27;+25498769876&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;user&#x27;,
created: &#x27;05/28/2020&#x27;,
balance: &#x27;5621&#x27;,
failedPinAttempts: 3,
status: &#x27;approved&#x27;,
bio: &#x27;Shop&#x27;,
gender: &#x27;female&#x27;,
},
{
id: 5,
name: &#x27;Silver Fia&#x27;,
phone: &#x27;+25462518374&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;token agent&#x27;,
created: &#x27;10/10/2020&#x27;,
balance: &#x27;817&#x27;,
failedPinAttempts: 0,
status: &#x27;unapproved&#x27;,
bio: &#x27;Electronics&#x27;,
gender: &#x27;male&#x27;,
},
]</code>
</td>
</tr>
@@ -233,8 +299,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="71"
class="link-to-prism">src/testing/user-service-stub.ts:71</a></div>
<div class="io-line">Defined in <a href="" data-line="134"
class="link-to-prism">src/testing/user-service-stub.ts:134</a></div>
</td>
</tr>
@@ -303,8 +369,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="61"
class="link-to-prism">src/testing/user-service-stub.ts:61</a></div>
<div class="io-line">Defined in <a href="" data-line="124"
class="link-to-prism">src/testing/user-service-stub.ts:124</a></div>
</td>
</tr>
@@ -373,8 +439,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="37"
class="link-to-prism">src/testing/user-service-stub.ts:37</a></div>
<div class="io-line">Defined in <a href="" data-line="103"
class="link-to-prism">src/testing/user-service-stub.ts:103</a></div>
</td>
</tr>
@@ -443,8 +509,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="21"
class="link-to-prism">src/testing/user-service-stub.ts:21</a></div>
<div class="io-line">Defined in <a href="" data-line="87"
class="link-to-prism">src/testing/user-service-stub.ts:87</a></div>
</td>
</tr>
@@ -501,15 +567,75 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {Observable, of} from &#x27;rxjs&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Observable, of } from &#x27;rxjs&#x27;;
export class UserServiceStub {
users &#x3D; [
{id: 1, name: &#x27;John Doe&#x27;, phone: &#x27;+25412345678&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;user&#x27;, created: &#x27;08/16/2020&#x27;, balance: &#x27;12987&#x27;, failedPinAttempts: 1, status: &#x27;approved&#x27;, bio: &#x27;Bodaboda&#x27;, gender: &#x27;male&#x27;},
{id: 2, name: &#x27;Jane Buck&#x27;, phone: &#x27;+25412341234&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;vendor&#x27;, created: &#x27;04/02/2020&#x27;, balance: &#x27;56281&#x27;, failedPinAttempts: 0, status: &#x27;approved&#x27;, bio: &#x27;Groceries&#x27;, gender: &#x27;female&#x27;},
{id: 3, name: &#x27;Mc Donald&#x27;, phone: &#x27;+25498765432&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;group&#x27;, created: &#x27;11/16/2020&#x27;, balance: &#x27;450&#x27;, failedPinAttempts: 2, status: &#x27;unapproved&#x27;, bio: &#x27;Food&#x27;, gender: &#x27;male&#x27;},
{id: 4, name: &#x27;Hera Cles&#x27;, phone: &#x27;+25498769876&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;user&#x27;, created: &#x27;05/28/2020&#x27;, balance: &#x27;5621&#x27;, failedPinAttempts: 3, status: &#x27;approved&#x27;, bio: &#x27;Shop&#x27;, gender: &#x27;female&#x27;},
{id: 5, name: &#x27;Silver Fia&#x27;, phone: &#x27;+25462518374&#x27;, address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;, type: &#x27;token agent&#x27;, created: &#x27;10/10/2020&#x27;, balance: &#x27;817&#x27;, failedPinAttempts: 0, status: &#x27;unapproved&#x27;, bio: &#x27;Electronics&#x27;, gender: &#x27;male&#x27;},
{
id: 1,
name: &#x27;John Doe&#x27;,
phone: &#x27;+25412345678&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;user&#x27;,
created: &#x27;08/16/2020&#x27;,
balance: &#x27;12987&#x27;,
failedPinAttempts: 1,
status: &#x27;approved&#x27;,
bio: &#x27;Bodaboda&#x27;,
gender: &#x27;male&#x27;,
},
{
id: 2,
name: &#x27;Jane Buck&#x27;,
phone: &#x27;+25412341234&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;vendor&#x27;,
created: &#x27;04/02/2020&#x27;,
balance: &#x27;56281&#x27;,
failedPinAttempts: 0,
status: &#x27;approved&#x27;,
bio: &#x27;Groceries&#x27;,
gender: &#x27;female&#x27;,
},
{
id: 3,
name: &#x27;Mc Donald&#x27;,
phone: &#x27;+25498765432&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;group&#x27;,
created: &#x27;11/16/2020&#x27;,
balance: &#x27;450&#x27;,
failedPinAttempts: 2,
status: &#x27;unapproved&#x27;,
bio: &#x27;Food&#x27;,
gender: &#x27;male&#x27;,
},
{
id: 4,
name: &#x27;Hera Cles&#x27;,
phone: &#x27;+25498769876&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;user&#x27;,
created: &#x27;05/28/2020&#x27;,
balance: &#x27;5621&#x27;,
failedPinAttempts: 3,
status: &#x27;approved&#x27;,
bio: &#x27;Shop&#x27;,
gender: &#x27;female&#x27;,
},
{
id: 5,
name: &#x27;Silver Fia&#x27;,
phone: &#x27;+25462518374&#x27;,
address: &#x27;0xc86ff893ac40d3950b4d5f94a9b837258b0a9865&#x27;,
type: &#x27;token agent&#x27;,
created: &#x27;10/10/2020&#x27;,
balance: &#x27;817&#x27;,
failedPinAttempts: 0,
status: &#x27;unapproved&#x27;,
bio: &#x27;Electronics&#x27;,
gender: &#x27;male&#x27;,
},
];
actions &#x3D; [
@@ -518,7 +644,13 @@ export class UserServiceStub {
{ id: 3, user: &#x27;Will&#x27;, role: &#x27;superadmin&#x27;, action: &#x27;Reclaim RSV 1000&#x27;, approval: true },
{ id: 4, user: &#x27;Vivian&#x27;, role: &#x27;enroller&#x27;, action: &#x27;Complete user profile&#x27;, approval: true },
{ id: 5, user: &#x27;Jack&#x27;, role: &#x27;enroller&#x27;, action: &#x27;Reclaim RSV 200&#x27;, approval: false },
{ id: 6, user: &#x27;Patience&#x27;, role: &#x27;enroller&#x27;, action: &#x27;Change user information&#x27;, approval: false }
{
id: 6,
user: &#x27;Patience&#x27;,
role: &#x27;enroller&#x27;,
action: &#x27;Change user information&#x27;,
approval: false,
},
];
getUserById(id: string): any {
@@ -533,7 +665,7 @@ export class UserServiceStub {
failedPinAttempts: 1,
status: &#x27;approved&#x27;,
bio: &#x27;Bodaboda&#x27;,
gender: &#x27;male&#x27;
gender: &#x27;male&#x27;,
};
}
@@ -544,20 +676,17 @@ export class UserServiceStub {
key: {
ethereum: [
&#x27;0x51d3c8e2e421604e2b644117a362d589c5434739&#x27;,
&#x27;0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D&#x27;
]
&#x27;0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D&#x27;,
],
},
location: {
external: {},
latitude: &#x27;22.430670&#x27;,
longitude: &#x27;151.002995&#x27;
longitude: &#x27;151.002995&#x27;,
},
selling: [
&#x27;environment&#x27;,
&#x27;health&#x27;,
&#x27;transport&#x27;
],
vcard: &#x27;QkVHSU46VkNBUkQNClZFUlNJT046My4wDQpFTUFJTDphYXJuZXNlbkBob3RtYWlsLmNvbQ0KRk46S3VydMKgS3JhbmpjDQpOOktyYW5qYztLdXJ0Ozs7DQpURUw7VFlQPUNFTEw6NjkyNTAzMzQ5ODE5Ng0KRU5EOlZDQVJEDQo&#x3D;&#x27;
selling: [&#x27;environment&#x27;, &#x27;health&#x27;, &#x27;transport&#x27;],
vcard:
&#x27;QkVHSU46VkNBUkQNClZFUlNJT046My4wDQpFTUFJTDphYXJuZXNlbkBob3RtYWlsLmNvbQ0KRk46S3VydMKgS3JhbmpjDQpOOktyYW5qYztLdXJ0Ozs7DQpURUw7VFlQPUNFTEw6NjkyNTAzMzQ5ODE5Ng0KRU5EOlZDQVJEDQo&#x3D;&#x27;,
});
}
@@ -567,7 +696,7 @@ export class UserServiceStub {
user: &#x27;Tom&#x27;,
role: &#x27;enroller&#x27;,
action: &#x27;Disburse RSV 100&#x27;,
approval: false
approval: false,
};
}
@@ -577,7 +706,7 @@ export class UserServiceStub {
user: &#x27;Tom&#x27;,
role: &#x27;enroller&#x27;,
action: &#x27;Disburse RSV 100&#x27;,
approval: true
approval: true,
};
}
}