Parcourir la source

Add missing test user fields in seeds

Also change the favicon to better match the colorscheme. An additional
section is added to settings.vue to mock the new fields.
master
Immanuel Onyeka il y a 2 ans
Parent
révision
418dda9ad4
5 fichiers modifiés avec 96 ajouts et 10 suppressions
  1. BIN
      assets/image/icon/hat2.png
  2. +18
    -3
      components/settings.vue
  3. +1
    -1
      master.tpl
  4. +1
    -0
      migrations/0_29092022_create_main_tables.sql
  5. +76
    -6
      migrations/seed.sql

BIN
assets/image/icon/hat2.png Voir le fichier

Avant Après
Largeur: 50  |  Hauteur: 50  |  Taille: 5.3 KiB

+ 18
- 3
components/settings.vue Voir le fichier

@@ -9,18 +9,33 @@
</section>

<section class="form inputs">
<h3>Branch Header</h3>
<span>Letterhead as appears on PDFs.</span>
<h3>Letterhead</h3>
<span>Header as appears on PDFs.</span>
<img src="/assets/image/mintberry.jpg" alt="avatar">
<button>Upload</button>
</section>

<section class="form inputs special">
<h3>Login</h3>
<h3>Profile</h3>
<label for="">First Name</label>
<input type="text">
<label for="">Last Name</label>
<input type="text">
<label for="">NMLS ID</label>
<input type="text">
<label for="">Branch ID</label>
<input type="text">

<select id="" name="" >
<option value="usa">USA</option>
<option value="canada">Canada</option>
</select>

<button @click="check">Save</button>
</section>

<section class="form inputs special">
<h3>Login</h3>
<label for="">Email</label>
<input type="text">
<label for="">New Password</label>


+ 1
- 1
master.tpl Voir le fichier

@@ -5,7 +5,7 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/assets/main.css">
<link rel="shortcut icon" type="image/svg+xml"
href="/assets/image/icon/sheriff-hat-50.png" />
href="/assets/image/icon/hat2.png" />
<title>Skouter - {{.Title}}</title>
</head>



+ 1
- 0
migrations/0_29092022_create_main_tables.sql Voir le fichier

@@ -18,6 +18,7 @@ CREATE TABLE user (
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
password CHAR(64) NOT NULL,
verified BOOLEAN,
branch_id INT,
/* The password should be a SHA256 hash in hex format. It's length doesn't
* vary */


+ 76
- 6
migrations/seed.sql Voir le fichier

@@ -1,7 +1,77 @@
INSERT INTO user
(firstName, lastName, nmls)
INSERT INTO branch
(type, num )
VALUES
('Blue Train', 'John Coltrane', 56.99),
('Giant Steps', 'John Coltrane', 63.99),
('Jeru', 'Gerry Mulligan', 17.99),
('Sarah Vaughan', 'Sarah Vaughan', 34.98);
('NMLS', 'abc123idk'),
('FSRA', 'another branch');

INSERT INTO user
(firstName,
lastName,
password,
nmls,
branch_id,
country,
title,
email,
verified,
status
) VALUES

(
'Blue',
'Coltrane',
sha2('test123', 256),
'nml415bas',
0,
'Canada',
'Loan Officer',
'test@example.com',
true,
'Free'
),

(
'Giant',
'Coltrane',
sha2('test123', 256),
'jsasd',
0,
'USA',
'Mortgage Broker',
'unverified@example.com',
false,
'Free'
),

(
'Jeru',
'Mulligan',
sha2('test123', 256),
'asb512',
0,
'USA',
'Branch Manager',
'manager@example.com',
true,
'Free'
),
;

INSERT INTO license (
user_id,
type,
num
) VALUES

(
(SELECT id FROM user WHERE email='verified@example.com'),
'NMLS',
'randomnmls',
),

(
(SELECT id FROM user WHERE email='manager@example.com'),
'FSRA',
'examplefsra',
)
;

Chargement…
Annuler
Enregistrer