feat: customer notes migration
feat: customer notes backend operations feat: add customer note mutation feat: add editing capabilities to PropertyCard feat: connect customer notes backend to frontend fix: customer note form and static content styling fix: SQL uppercasing fix: set default value for notes content fix: SQL after dev rebase refactor: move get current user token to separate method
This commit is contained in:
parent
f14674c4f3
commit
dcd3259484
11 changed files with 268 additions and 38 deletions
20
migrations/1627868356883-customer-custom-notes.js
Normal file
20
migrations/1627868356883-customer-custom-notes.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
`CREATE TABLE customer_notes (
|
||||
id UUID PRIMARY KEY,
|
||||
customer_id UUID NOT NULL REFERENCES customers(id),
|
||||
created TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
last_edited_at TIMESTAMPTZ,
|
||||
last_edited_by UUID REFERENCES users(id),
|
||||
content TEXT NOT NULL DEFAULT ''
|
||||
)`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue