Skip to content

Commit 1a3c5ae

Browse files
author
simonho
committed
fix: sample data more realistic
1 parent f777840 commit 1a3c5ae

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

frontend/src/libs/util.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,6 @@ export let Util = {
532532
// Type 3: 1-3 or A-D
533533
// Type 4: 1,2,8-10 or A,B,D-E
534534
parseNumbernamesStr(availNames: Array<string>, str: string): Array<string> {
535-
debugger
536535
str = str.trim().toUpperCase()
537536
if (str === '') throw new Error(`Cannot be empty string`)
538537
let rtnVals = new Array<string>

frontend/src/pages/tenants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ export class Tenants implements IPage {
147147
private afResultToRecord(values: any): any {
148148
if (values.password != null && values.password.trim() === '')
149149
delete values.password
150-
debugger
151150
if (this._autoform.mode === FormMode.New) {
152151
values.recType = 0 // Force this record is human rather than machine
153152
values.meta = '{}'

src/data/samples/insertOthers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ INSERT INTO Marketplaces(id, userId, dateCreated, title, dateStart, dateEnd, isH
253253
'b4K7av-Fy1m5juR0bvnb8',
254254
'${userId}',
255255
'${now}',
256-
'${JSON.stringify({ en: "Special Offer from 7-11 this week" })}',
256+
'${JSON.stringify({ en: "Seafood Shop special offer this weekend 2023-02-18 to 2023-02-19 (Sample)" })}',
257257
'${today}',
258258
'${date2day}',
259259
0,
260-
'https://f004.backblazeb2.com/file/vpms-hk/assets/sample_marketplace_cht.jpg',
260+
'https://f004.backblazeb2.com/file/vpms-hk/assets/sample_seafood_flyer.jpg',
261261
null,
262262
'${JSON.stringify({ residence: { owner: true, tenant: true, occupant: false, agent: false }, carpark: null, shop: null })}');
263263
`)
@@ -273,12 +273,12 @@ INSERT INTO Notices(id, userId, dateCreated, title, issueDate, audiences, folder
273273
'mH4Aa9JMy99E7VTeqpXrU',
274274
'${userId}',
275275
'${now}',
276-
'${JSON.stringify({ en: "No water on <...>" })}',
276+
'${JSON.stringify({ en: "Temporary Water Shut Off on 3 May (Sample)" })}',
277277
'${today}',
278278
'${JSON.stringify({ res: true, car: null, shp: null })}',
279279
'wr37AwXnt1JJSQ3evcmUu',
280280
0,
281-
'https://f004.backblazeb2.com/file/vpms-hk/directus/15f65053-5bb3-49d5-a81e-8ca3ea841a5b.pdf');
281+
'https://f004.backblazeb2.com/file/vpms-hk/assets/sample_notice_nowater.pdf');
282282
`)
283283
for (let i = 0; i < stmts.length; ++i) {
284284
rst = await env.DB.exec(stmts[i])
@@ -298,7 +298,7 @@ INSERT INTO Loops(id, userId, dateCreated, tenantId, recId, type, title, url, me
298298
'notice',
299299
'${JSON.stringify({ en: "Notice: No water today" })}',
300300
null,
301-
'${JSON.stringify({ senderName: '{"en":"senderName"}', titleId: 'mgrmtNotice', noticeId: 'mH4Aa9JMy99E7VTeqpXrU', audiences: '["residence","carpark"]', title: '{"en":"No water on <...>"}', issueDate: now })}');
301+
'${JSON.stringify({ senderName: '{"en":"senderName"}', titleId: 'mgrmtNotice', noticeId: 'mH4Aa9JMy99E7VTeqpXrU', audiences: '["residence","carpark"]', title: '{"en":"Temporary Water Shut Off on 3 May (Sample)"}', issueDate: now })}');
302302
INSERT INTO Loops(id, userId, dateCreated, tenantId, recId, type, title, url, meta) VALUES(
303303
'9xZHtfAEiM85BxZl5yIAT',
304304
'${userId}',
@@ -308,7 +308,7 @@ INSERT INTO Loops(id, userId, dateCreated, tenantId, recId, type, title, url, me
308308
'marketplace',
309309
'${JSON.stringify({ en: "Special Offer from 7-11 this week" })}',
310310
null,
311-
'${JSON.stringify({ senderName: '{"en":"senderName"}', titleId: 'newAdWithImage', audiences: '["residence","carpark"]', adId: 'b4K7av-Fy1m5juR0bvnb8', title: '{"en":"Special Offer from 7-11 this week"}', postDate: now })}');
311+
'${JSON.stringify({ senderName: '{"en":"senderName"}', titleId: 'newAdWithImage', audiences: '["residence","carpark"]', adId: 'b4K7av-Fy1m5juR0bvnb8', title: '{"en":"Seafood Shop special offer this weekend 2023-02-18 to 2023-02-19 (Sample)"}', postDate: now })}');
312312
INSERT INTO Loops(id, userId, dateCreated, tenantId, recId, type, title, url, meta) VALUES(
313313
'rrYBcxxyHRGJ9dRfHeBSD',
314314
'${userId}',

0 commit comments

Comments
 (0)