summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/mock/fake
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/mock/fake')
-rw-r--r--usecaseui-portal/src/app/mock/fake/fakedata.js24
-rw-r--r--usecaseui-portal/src/app/mock/fake/mock.js7
2 files changed, 31 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/fake/fakedata.js b/usecaseui-portal/src/app/mock/fake/fakedata.js
new file mode 100644
index 00000000..a008c14a
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/fake/fakedata.js
@@ -0,0 +1,24 @@
+const faker = require("faker");
+const _ = require("lodash");
+faker.locale = "en";
+
+module.exports = {
+ customer: _.times(20, function (n) {
+ return {
+ id: n,
+ name: faker.name.findName(),
+ phone: faker.phone.phoneNumber(),
+ address: faker.address.streetAddress(),
+ avatar: faker.internet.avatar()
+ }
+ }),
+ home: _.times(10, function (n) {
+ return {
+ id: n,
+ name: faker.name.findName(),
+ phone: faker.phone.phoneNumber(),
+ address: faker.address.streetAddress(),
+ avatar: faker.internet.avatar()
+ }
+ }),
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/fake/mock.js b/usecaseui-portal/src/app/mock/fake/mock.js
new file mode 100644
index 00000000..2864d4c5
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/fake/mock.js
@@ -0,0 +1,7 @@
+const fakeData = require('./fakedata.js');
+module.exports = {
+ //Mock json
+ 'customer_info': fakeData.customer,
+ 'alarm_formdata_multiple': fakeData,
+ 'home': fakeData.home,
+} \ No newline at end of file