瀏覽代碼

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 2 年之前
父節點
當前提交
418dda9ad4
共有 5 個檔案被更改,包括 96 行新增10 行删除
  1. 二進制
      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

二進制
assets/image/icon/hat2.png 查看文件

Before After
Width: 50  |  Height: 50  |  Size: 5.3 KiB

+ 18
- 3
components/settings.vue 查看文件

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


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


<section class="form inputs special"> <section class="form inputs special">
<h3>Login</h3> <h3>Profile</h3>
<label for="">First Name</label> <label for="">First Name</label>
<input type="text"> <input type="text">
<label for="">Last Name</label> <label for="">Last Name</label>
<input type="text"> <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> <label for="">Email</label>
<input type="text"> <input type="text">
<label for="">New Password</label> <label for="">New Password</label>


+ 1
- 1
master.tpl 查看文件

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




+ 1
- 0
migrations/0_29092022_create_main_tables.sql 查看文件

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


+ 76
- 6
migrations/seed.sql 查看文件

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

||||||
x
 
000:0
Loading…
取消
儲存