ソースを参照

got Axios working + start of registration

master
George Williams 5年前
コミット
f9bd45815e

+ 141
- 12
package-lock.json ファイルの表示

1039
 			"integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=",
1039
 			"integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=",
1040
 			"dev": true
1040
 			"dev": true
1041
 		},
1041
 		},
1042
+		"@nuxt/opencollective": {
1043
+			"version": "0.3.0",
1044
+			"resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.3.0.tgz",
1045
+			"integrity": "sha512-Vf09BxCdj1iT2IRqVwX5snaY2WCTkvM0O4cWWSO1ThCFuc4if0Q/nNwAgCxRU0FeYHJ7DdyMUNSdswCLKlVqeg==",
1046
+			"requires": {
1047
+				"chalk": "^2.4.2",
1048
+				"consola": "^2.10.1",
1049
+				"node-fetch": "^2.6.0"
1050
+			}
1051
+		},
1042
 		"@soda/friendly-errors-webpack-plugin": {
1052
 		"@soda/friendly-errors-webpack-plugin": {
1043
 			"version": "1.7.1",
1053
 			"version": "1.7.1",
1044
 			"resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz",
1054
 			"resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz",
1941
 			"version": "3.2.1",
1951
 			"version": "3.2.1",
1942
 			"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz",
1952
 			"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz",
1943
 			"integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
1953
 			"integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
1944
-			"dev": true,
1945
 			"requires": {
1954
 			"requires": {
1946
 				"color-convert": "^1.9.0"
1955
 				"color-convert": "^1.9.0"
1947
 			}
1956
 			}
2162
 			"integrity": "sha1-oXs6jqgRBg501H0wYSJACtRJeuI=",
2171
 			"integrity": "sha1-oXs6jqgRBg501H0wYSJACtRJeuI=",
2163
 			"dev": true
2172
 			"dev": true
2164
 		},
2173
 		},
2174
+		"axios": {
2175
+			"version": "0.19.2",
2176
+			"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
2177
+			"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
2178
+			"requires": {
2179
+				"follow-redirects": "1.5.10"
2180
+			},
2181
+			"dependencies": {
2182
+				"debug": {
2183
+					"version": "3.1.0",
2184
+					"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
2185
+					"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
2186
+					"requires": {
2187
+						"ms": "2.0.0"
2188
+					}
2189
+				},
2190
+				"follow-redirects": {
2191
+					"version": "1.5.10",
2192
+					"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
2193
+					"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
2194
+					"requires": {
2195
+						"debug": "=3.1.0"
2196
+					}
2197
+				},
2198
+				"ms": {
2199
+					"version": "2.0.0",
2200
+					"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2201
+					"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
2202
+				}
2203
+			}
2204
+		},
2165
 		"babel-eslint": {
2205
 		"babel-eslint": {
2166
 			"version": "10.1.0",
2206
 			"version": "10.1.0",
2167
 			"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz",
2207
 			"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz",
2198
 				"object.assign": "^4.1.0"
2238
 				"object.assign": "^4.1.0"
2199
 			}
2239
 			}
2200
 		},
2240
 		},
2241
+		"babel-runtime": {
2242
+			"version": "6.26.0",
2243
+			"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
2244
+			"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
2245
+			"requires": {
2246
+				"core-js": "^2.4.0",
2247
+				"regenerator-runtime": "^0.11.0"
2248
+			},
2249
+			"dependencies": {
2250
+				"core-js": {
2251
+					"version": "2.6.11",
2252
+					"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
2253
+					"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
2254
+				},
2255
+				"regenerator-runtime": {
2256
+					"version": "0.11.1",
2257
+					"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
2258
+					"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
2259
+				}
2260
+			}
2261
+		},
2201
 		"balanced-match": {
2262
 		"balanced-match": {
2202
 			"version": "1.0.0",
2263
 			"version": "1.0.0",
2203
 			"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
2264
 			"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
2396
 			"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
2457
 			"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
2397
 			"dev": true
2458
 			"dev": true
2398
 		},
2459
 		},
2460
+		"bootstrap": {
2461
+			"version": "4.5.0",
2462
+			"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
2463
+			"integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA=="
2464
+		},
2465
+		"bootstrap-vue": {
2466
+			"version": "2.15.0",
2467
+			"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.15.0.tgz",
2468
+			"integrity": "sha512-ncxWkDG0mKFVot314wWKJELi+ESO7k6ngV//qvJFs9iVzlFI8Hx3rBVbpcPW2vrJ+0vitH8N2SOwn4fdQ3frMQ==",
2469
+			"requires": {
2470
+				"@nuxt/opencollective": "^0.3.0",
2471
+				"bootstrap": ">=4.5.0 <5.0.0",
2472
+				"popper.js": "^1.16.1",
2473
+				"portal-vue": "^2.1.7",
2474
+				"vue-functional-data-merge": "^3.1.0"
2475
+			}
2476
+		},
2399
 		"brace-expansion": {
2477
 		"brace-expansion": {
2400
 			"version": "1.1.11",
2478
 			"version": "1.1.11",
2401
 			"resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz",
2479
 			"resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz",
2820
 			"version": "2.4.2",
2898
 			"version": "2.4.2",
2821
 			"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz",
2899
 			"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz",
2822
 			"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
2900
 			"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
2823
-			"dev": true,
2824
 			"requires": {
2901
 			"requires": {
2825
 				"ansi-styles": "^3.2.1",
2902
 				"ansi-styles": "^3.2.1",
2826
 				"escape-string-regexp": "^1.0.5",
2903
 				"escape-string-regexp": "^1.0.5",
3133
 			"version": "1.9.3",
3210
 			"version": "1.9.3",
3134
 			"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz",
3211
 			"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz",
3135
 			"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
3212
 			"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
3136
-			"dev": true,
3137
 			"requires": {
3213
 			"requires": {
3138
 				"color-name": "1.1.3"
3214
 				"color-name": "1.1.3"
3139
 			}
3215
 			}
3141
 		"color-name": {
3217
 		"color-name": {
3142
 			"version": "1.1.3",
3218
 			"version": "1.1.3",
3143
 			"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz",
3219
 			"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz",
3144
-			"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
3145
-			"dev": true
3220
+			"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
3146
 		},
3221
 		},
3147
 		"color-string": {
3222
 		"color-string": {
3148
 			"version": "1.5.3",
3223
 			"version": "1.5.3",
3252
 			"integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=",
3327
 			"integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=",
3253
 			"dev": true
3328
 			"dev": true
3254
 		},
3329
 		},
3330
+		"consola": {
3331
+			"version": "2.12.1",
3332
+			"resolved": "https://registry.npmjs.org/consola/-/consola-2.12.1.tgz",
3333
+			"integrity": "sha512-aEkkju9ZcEa9y2MhzNhfmTUws/CEZZ0LKu0FxftSU3HygPfVMMIMSYyYct+xBN6XNRhsaDZjw2HAv3m2ammXSA=="
3334
+		},
3255
 		"console-browserify": {
3335
 		"console-browserify": {
3256
 			"version": "1.2.0",
3336
 			"version": "1.2.0",
3257
 			"resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz",
3337
 			"resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz",
4426
 		"escape-string-regexp": {
4506
 		"escape-string-regexp": {
4427
 			"version": "1.0.5",
4507
 			"version": "1.0.5",
4428
 			"resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1587627212242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz",
4508
 			"resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1587627212242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz",
4429
-			"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
4430
-			"dev": true
4509
+			"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
4431
 		},
4510
 		},
4432
 		"eslint": {
4511
 		"eslint": {
4433
 			"version": "6.8.0",
4512
 			"version": "6.8.0",
5470
 		"has-flag": {
5549
 		"has-flag": {
5471
 			"version": "3.0.0",
5550
 			"version": "3.0.0",
5472
 			"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz",
5551
 			"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz",
5473
-			"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
5474
-			"dev": true
5552
+			"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
5475
 		},
5553
 		},
5476
 		"has-symbols": {
5554
 		"has-symbols": {
5477
 			"version": "1.0.1",
5555
 			"version": "1.0.1",
6457
 				"easy-stack": "^1.0.0"
6535
 				"easy-stack": "^1.0.0"
6458
 			}
6536
 			}
6459
 		},
6537
 		},
6538
+		"js-sha256": {
6539
+			"version": "0.9.0",
6540
+			"resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz",
6541
+			"integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA=="
6542
+		},
6460
 		"js-tokens": {
6543
 		"js-tokens": {
6461
 			"version": "4.0.0",
6544
 			"version": "4.0.0",
6462
 			"resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1586796305651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz",
6545
 			"resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1586796305651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz",
6808
 				"object-visit": "^1.0.0"
6891
 				"object-visit": "^1.0.0"
6809
 			}
6892
 			}
6810
 		},
6893
 		},
6894
+		"marker-clusterer-plus": {
6895
+			"version": "2.1.4",
6896
+			"resolved": "https://registry.npmjs.org/marker-clusterer-plus/-/marker-clusterer-plus-2.1.4.tgz",
6897
+			"integrity": "sha1-+O/3TVmdqzt9Dj/tUmTqDnBPXWc="
6898
+		},
6811
 		"md5.js": {
6899
 		"md5.js": {
6812
 			"version": "1.3.5",
6900
 			"version": "1.3.5",
6813
 			"resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz",
6901
 			"resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz",
7224
 				"lower-case": "^1.1.1"
7312
 				"lower-case": "^1.1.1"
7225
 			}
7313
 			}
7226
 		},
7314
 		},
7315
+		"node-fetch": {
7316
+			"version": "2.6.0",
7317
+			"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
7318
+			"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
7319
+		},
7227
 		"node-forge": {
7320
 		"node-forge": {
7228
 			"version": "0.9.0",
7321
 			"version": "0.9.0",
7229
 			"resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz",
7322
 			"resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz",
7914
 				"ts-pnp": "^1.1.6"
8007
 				"ts-pnp": "^1.1.6"
7915
 			}
8008
 			}
7916
 		},
8009
 		},
8010
+		"popper.js": {
8011
+			"version": "1.16.1",
8012
+			"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
8013
+			"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
8014
+		},
8015
+		"portal-vue": {
8016
+			"version": "2.1.7",
8017
+			"resolved": "https://registry.npmjs.org/portal-vue/-/portal-vue-2.1.7.tgz",
8018
+			"integrity": "sha512-+yCno2oB3xA7irTt0EU5Ezw22L2J51uKAacE/6hMPMoO/mx3h4rXFkkBkT4GFsMDv/vEe8TNKC3ujJJ0PTwb6g=="
8019
+		},
7917
 		"portfinder": {
8020
 		"portfinder": {
7918
 			"version": "1.0.26",
8021
 			"version": "1.0.26",
7919
 			"resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.26.tgz",
8022
 			"resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.26.tgz",
10007
 			"version": "5.5.0",
10110
 			"version": "5.5.0",
10008
 			"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1574418315746&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz",
10111
 			"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1574418315746&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz",
10009
 			"integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
10112
 			"integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
10010
-			"dev": true,
10011
 			"requires": {
10113
 			"requires": {
10012
 				"has-flag": "^3.0.0"
10114
 				"has-flag": "^3.0.0"
10013
 			}
10115
 			}
10697
 		},
10799
 		},
10698
 		"vue": {
10800
 		"vue": {
10699
 			"version": "2.6.11",
10801
 			"version": "2.6.11",
10700
-			"resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz",
10701
-			"integrity": "sha1-dllNh31LEiNEBuhONSdcbVFBJcU="
10802
+			"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz",
10803
+			"integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ=="
10804
+		},
10805
+		"vue-browser-geolocation": {
10806
+			"version": "1.8.0",
10807
+			"resolved": "https://registry.npmjs.org/vue-browser-geolocation/-/vue-browser-geolocation-1.8.0.tgz",
10808
+			"integrity": "sha512-fI9fqQg1v5HP5LUR3juWIvWRIlyrqYrGDmXB8aux+mLnOV4V9c423InmTFK3UyRS0yHoBUGNIWO0GVufeczfNw==",
10809
+			"requires": {
10810
+				"vue": "^2.0.1"
10811
+			}
10702
 		},
10812
 		},
10703
 		"vue-carousel": {
10813
 		"vue-carousel": {
10704
 			"version": "0.18.0",
10814
 			"version": "0.18.0",
10743
 				}
10853
 				}
10744
 			}
10854
 			}
10745
 		},
10855
 		},
10856
+		"vue-functional-data-merge": {
10857
+			"version": "3.1.0",
10858
+			"resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz",
10859
+			"integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA=="
10860
+		},
10746
 		"vue-hot-reload-api": {
10861
 		"vue-hot-reload-api": {
10747
 			"version": "2.3.4",
10862
 			"version": "2.3.4",
10748
 			"resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz",
10863
 			"resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz",
10809
 			"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
10924
 			"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
10810
 			"dev": true
10925
 			"dev": true
10811
 		},
10926
 		},
10927
+		"vue2-google-maps": {
10928
+			"version": "0.10.7",
10929
+			"resolved": "https://registry.npmjs.org/vue2-google-maps/-/vue2-google-maps-0.10.7.tgz",
10930
+			"integrity": "sha512-y5aBJTAsfGvpsbfgPaeWU7o7QbOeINZKsP6SB9qrBe8U8EYBFO/bTWo3rcMq/NOtgT/XssV3Nwg/2u3no6jWbw==",
10931
+			"requires": {
10932
+				"babel-runtime": "^6.26.0",
10933
+				"marker-clusterer-plus": "^2.1.4"
10934
+			}
10935
+		},
10936
+		"vuex": {
10937
+			"version": "3.4.0",
10938
+			"resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.4.0.tgz",
10939
+			"integrity": "sha1-IMwIYGLXUHafzh/rs05/zurr3kU="
10940
+		},
10812
 		"watchpack": {
10941
 		"watchpack": {
10813
 			"version": "1.7.2",
10942
 			"version": "1.7.2",
10814
 			"resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.2.tgz",
10943
 			"resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.2.tgz",

+ 55
- 47
package.json ファイルの表示

1
 {
1
 {
2
-	"name": "ProRestaurant",
3
-	"version": "0.1.0",
4
-	"private": true,
5
-	"scripts": {
6
-		"serve": "vue-cli-service serve",
7
-		"build": "vue-cli-service build",
8
-		"lint": "vue-cli-service lint"
9
-	},
10
-	"dependencies": {
11
-		"core-js": "^3.6.4",
12
-		"vue": "^2.6.11",
13
-		"vue-carousel": "^0.18.0",
14
-		"vue-router": "^3.1.6"
15
-	},
16
-	"devDependencies": {
17
-		"@vue/cli-plugin-babel": "~4.3.0",
18
-		"@vue/cli-plugin-eslint": "~4.3.0",
19
-		"@vue/cli-plugin-router": "~4.3.0",
20
-		"@vue/cli-service": "~4.3.0",
21
-		"@vue/eslint-config-prettier": "^6.0.0",
22
-		"babel-eslint": "^10.1.0",
23
-		"eslint": "^6.7.2",
24
-		"eslint-plugin-prettier": "^3.1.1",
25
-		"eslint-plugin-vue": "^6.2.2",
26
-		"prettier": "^1.19.1",
27
-		"vue-template-compiler": "^2.6.11"
28
-	},
29
-	"eslintConfig": {
30
-		"root": true,
31
-		"env": {
32
-			"node": true
33
-		},
34
-		"extends": [
35
-			"plugin:vue/essential",
36
-			"eslint:recommended",
37
-			"@vue/prettier"
38
-		],
39
-		"parserOptions": {
40
-			"parser": "babel-eslint"
41
-		},
42
-		"rules": {}
43
-	},
44
-	"browserslist": [
45
-		"> 1%",
46
-		"last 2 versions",
47
-		"not dead"
48
-	]
2
+  "name": "ProRestaurant",
3
+  "version": "0.1.0",
4
+  "private": true,
5
+  "scripts": {
6
+    "serve": "vue-cli-service serve",
7
+    "build": "vue-cli-service build",
8
+    "lint": "vue-cli-service lint"
9
+  },
10
+  "dependencies": {
11
+    "axios": "^0.19.2",
12
+    "bootstrap": "^4.5.0",
13
+    "bootstrap-vue": "^2.15.0",
14
+    "core-js": "^3.6.4",
15
+    "js-sha256": "^0.9.0",
16
+    "vue": "^2.6.11",
17
+    "vue-browser-geolocation": "^1.8.0",
18
+    "vue-carousel": "^0.18.0",
19
+    "vue-router": "^3.1.6",
20
+    "vue2-google-maps": "^0.10.7",
21
+    "vuex": "^3.1.3"
22
+  },
23
+  "devDependencies": {
24
+    "@vue/cli-plugin-babel": "~4.3.0",
25
+    "@vue/cli-plugin-eslint": "~4.3.0",
26
+    "@vue/cli-plugin-router": "~4.3.0",
27
+    "@vue/cli-plugin-vuex": "^4.3.1",
28
+    "@vue/cli-service": "~4.3.0",
29
+    "@vue/eslint-config-prettier": "^6.0.0",
30
+    "babel-eslint": "^10.1.0",
31
+    "eslint": "^6.7.2",
32
+    "eslint-plugin-prettier": "^3.1.1",
33
+    "eslint-plugin-vue": "^6.2.2",
34
+    "prettier": "^1.19.1",
35
+    "vue-template-compiler": "^2.6.11"
36
+  },
37
+  "eslintConfig": {
38
+    "root": true,
39
+    "env": {
40
+      "node": true
41
+    },
42
+    "extends": [
43
+      "plugin:vue/essential",
44
+      "eslint:recommended",
45
+      "@vue/prettier"
46
+    ],
47
+    "parserOptions": {
48
+      "parser": "babel-eslint"
49
+    },
50
+    "rules": {}
51
+  },
52
+  "browserslist": [
53
+    "> 1%",
54
+    "last 2 versions",
55
+    "not dead"
56
+  ]
49
 }
57
 }

バイナリ
public/img/sort-down.png ファイルの表示


バイナリ
public/img/sort-up.png ファイルの表示


+ 83
- 80
src/assets/assets/mail/contact_me.js ファイルの表示

1
-$(function () {
2
-    $(
3
-        "#contactForm input,#contactForm textarea,#contactForm button"
4
-    ).jqBootstrapValidation({
5
-        preventSubmit: true,
6
-        submitError: function ($form, event, errors) {
7
-            // additional error messages or events
1
+$(function() {
2
+  $(
3
+    "#contactForm input,#contactForm textarea,#contactForm button"
4
+  ).jqBootstrapValidation({
5
+    preventSubmit: true,
6
+    submitError: function($form, event, errors) {
7
+      // additional error messages or events
8
+    },
9
+    submitSuccess: function($form, event) {
10
+      event.preventDefault(); // prevent default submit behaviour
11
+      // get values from FORM
12
+      var name = $("input#name").val();
13
+      var email = $("input#email").val();
14
+      var phone = $("input#phone").val();
15
+      var message = $("textarea#message").val();
16
+      var firstName = name; // For Success/Failure Message
17
+      // Check for white space in name for Success/Fail message
18
+      if (firstName.indexOf(" ") >= 0) {
19
+        firstName = name
20
+          .split(" ")
21
+          .slice(0, -1)
22
+          .join(" ");
23
+      }
24
+      $this = $("#sendMessageButton");
25
+      $this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages
26
+      $.ajax({
27
+        url: "/assets/mail/contact_me.php",
28
+        type: "POST",
29
+        data: {
30
+          name: name,
31
+          phone: phone,
32
+          email: email,
33
+          message: message
8
         },
34
         },
9
-        submitSuccess: function ($form, event) {
10
-            event.preventDefault(); // prevent default submit behaviour
11
-            // get values from FORM
12
-            var name = $("input#name").val();
13
-            var email = $("input#email").val();
14
-            var phone = $("input#phone").val();
15
-            var message = $("textarea#message").val();
16
-            var firstName = name; // For Success/Failure Message
17
-            // Check for white space in name for Success/Fail message
18
-            if (firstName.indexOf(" ") >= 0) {
19
-                firstName = name.split(" ").slice(0, -1).join(" ");
20
-            }
21
-            $this = $("#sendMessageButton");
22
-            $this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages
23
-            $.ajax({
24
-                url: "/assets/mail/contact_me.php",
25
-                type: "POST",
26
-                data: {
27
-                    name: name,
28
-                    phone: phone,
29
-                    email: email,
30
-                    message: message,
31
-                },
32
-                cache: false,
33
-                success: function () {
34
-                    // Success message
35
-                    $("#success").html("<div class='alert alert-success'>");
36
-                    $("#success > .alert-success")
37
-                        .html(
38
-                            "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;"
39
-                        )
40
-                        .append("</button>");
41
-                    $("#success > .alert-success").append(
42
-                        "<strong>Your message has been sent. </strong>"
43
-                    );
44
-                    $("#success > .alert-success").append("</div>");
45
-                    //clear all fields
46
-                    $("#contactForm").trigger("reset");
47
-                },
48
-                error: function () {
49
-                    // Fail message
50
-                    $("#success").html("<div class='alert alert-danger'>");
51
-                    $("#success > .alert-danger")
52
-                        .html(
53
-                            "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;"
54
-                        )
55
-                        .append("</button>");
56
-                    $("#success > .alert-danger").append(
57
-                        $("<strong>").text(
58
-                            "Sorry " +
59
-                                firstName +
60
-                                ", it seems that my mail server is not responding. Please try again later!"
61
-                        )
62
-                    );
63
-                    $("#success > .alert-danger").append("</div>");
64
-                    //clear all fields
65
-                    $("#contactForm").trigger("reset");
66
-                },
67
-                complete: function () {
68
-                    setTimeout(function () {
69
-                        $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
70
-                    }, 1000);
71
-                },
72
-            });
35
+        cache: false,
36
+        success: function() {
37
+          // Success message
38
+          $("#success").html("<div class='alert alert-success'>");
39
+          $("#success > .alert-success")
40
+            .html(
41
+              "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;"
42
+            )
43
+            .append("</button>");
44
+          $("#success > .alert-success").append(
45
+            "<strong>Your message has been sent. </strong>"
46
+          );
47
+          $("#success > .alert-success").append("</div>");
48
+          //clear all fields
49
+          $("#contactForm").trigger("reset");
73
         },
50
         },
74
-        filter: function () {
75
-            return $(this).is(":visible");
51
+        error: function() {
52
+          // Fail message
53
+          $("#success").html("<div class='alert alert-danger'>");
54
+          $("#success > .alert-danger")
55
+            .html(
56
+              "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;"
57
+            )
58
+            .append("</button>");
59
+          $("#success > .alert-danger").append(
60
+            $("<strong>").text(
61
+              "Sorry " +
62
+                firstName +
63
+                ", it seems that my mail server is not responding. Please try again later!"
64
+            )
65
+          );
66
+          $("#success > .alert-danger").append("</div>");
67
+          //clear all fields
68
+          $("#contactForm").trigger("reset");
76
         },
69
         },
77
-    });
70
+        complete: function() {
71
+          setTimeout(function() {
72
+            $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
73
+          }, 1000);
74
+        }
75
+      });
76
+    },
77
+    filter: function() {
78
+      return $(this).is(":visible");
79
+    }
80
+  });
78
 
81
 
79
-    $('a[data-toggle="tab"]').click(function (e) {
80
-        e.preventDefault();
81
-        $(this).tab("show");
82
-    });
82
+  $('a[data-toggle="tab"]').click(function(e) {
83
+    e.preventDefault();
84
+    $(this).tab("show");
85
+  });
83
 });
86
 });
84
 
87
 
85
 /*When clicking on Full hide fail/success boxes */
88
 /*When clicking on Full hide fail/success boxes */
86
-$("#name").focus(function () {
87
-    $("#success").html("");
89
+$("#name").focus(function() {
90
+  $("#success").html("");
88
 });
91
 });

+ 622
- 459
src/assets/assets/mail/jqBootstrapValidation.js
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 5
- 0
src/assets/css/styles.css ファイルの表示

586
 	margin-right: auto;
586
 	margin-right: auto;
587
 	margin-left: auto;
587
 	margin-left: auto;
588
 }
588
 }
589
+
590
+.custompadding {	
591
+	padding-top: 120px;	
592
+}
593
+
589
 @media (min-width: 576px) {
594
 @media (min-width: 576px) {
590
 	.container {
595
 	.container {
591
 		max-width: 540px;
596
 		max-width: 540px;

+ 76
- 64
src/assets/js/scripts.js ファイルの表示

1
 /*!
1
 /*!
2
-    * Start Bootstrap - Freelancer v6.0.3 (https://startbootstrap.com/themes/freelancer)
3
-    * Copyright 2013-2020 Start Bootstrap
4
-    * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-freelancer/blob/master/LICENSE)
5
-    */
6
-    (function($) {
7
-    "use strict"; // Start of use strict
8
-  
9
-    // Smooth scrolling using jQuery easing
10
-    $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
11
-      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
12
-        var target = $(this.hash);
13
-        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
14
-        if (target.length) {
15
-          $('html, body').animate({
16
-            scrollTop: (target.offset().top - 71)
17
-          }, 1000, "easeInOutExpo");
18
-          return false;
19
-        }
2
+ * Start Bootstrap - Freelancer v6.0.3 (https://startbootstrap.com/themes/freelancer)
3
+ * Copyright 2013-2020 Start Bootstrap
4
+ * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-freelancer/blob/master/LICENSE)
5
+ */
6
+(function($) {
7
+  "use strict"; // Start of use strict
8
+
9
+  // Smooth scrolling using jQuery easing
10
+  $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
11
+    if (
12
+      location.pathname.replace(/^\//, "") ==
13
+        this.pathname.replace(/^\//, "") &&
14
+      location.hostname == this.hostname
15
+    ) {
16
+      var target = $(this.hash);
17
+      target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
18
+      if (target.length) {
19
+        $("html, body").animate(
20
+          {
21
+            scrollTop: target.offset().top - 71
22
+          },
23
+          1000,
24
+          "easeInOutExpo"
25
+        );
26
+        return false;
20
       }
27
       }
21
-    });
22
-  
23
-    // Scroll to top button appear
24
-    $(document).scroll(function() {
25
-      var scrollDistance = $(this).scrollTop();
26
-      if (scrollDistance > 100) {
27
-        $('.scroll-to-top').fadeIn();
28
-      } else {
29
-        $('.scroll-to-top').fadeOut();
30
-      }
31
-    });
32
-  
33
-    // Closes responsive menu when a scroll trigger link is clicked
34
-    $('.js-scroll-trigger').click(function() {
35
-      $('.navbar-collapse').collapse('hide');
36
-    });
37
-  
38
-    // Activate scrollspy to add active class to navbar items on scroll
39
-    $('body').scrollspy({
40
-      target: '#mainNav',
41
-      offset: 80
42
-    });
43
-  
44
-    // Collapse Navbar
45
-    var navbarCollapse = function() {
46
-      if ($("#mainNav").offset().top > 100) {
47
-        $("#mainNav").addClass("navbar-shrink");
48
-      } else {
49
-        $("#mainNav").removeClass("navbar-shrink");
50
-      }
51
-    };
52
-    // Collapse now if page is not at top
53
-    navbarCollapse();
54
-    // Collapse the navbar when page is scrolled
55
-    $(window).scroll(navbarCollapse);
56
-  
57
-    // Floating label headings for the contact form
58
-    $(function() {
59
-      $("body").on("input propertychange", ".floating-label-form-group", function(e) {
60
-        $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
61
-      }).on("focus", ".floating-label-form-group", function() {
28
+    }
29
+  });
30
+
31
+  // Scroll to top button appear
32
+  $(document).scroll(function() {
33
+    var scrollDistance = $(this).scrollTop();
34
+    if (scrollDistance > 100) {
35
+      $(".scroll-to-top").fadeIn();
36
+    } else {
37
+      $(".scroll-to-top").fadeOut();
38
+    }
39
+  });
40
+
41
+  // Closes responsive menu when a scroll trigger link is clicked
42
+  $(".js-scroll-trigger").click(function() {
43
+    $(".navbar-collapse").collapse("hide");
44
+  });
45
+
46
+  // Activate scrollspy to add active class to navbar items on scroll
47
+  $("body").scrollspy({
48
+    target: "#mainNav",
49
+    offset: 80
50
+  });
51
+
52
+  // Collapse Navbar
53
+  var navbarCollapse = function() {
54
+    if ($("#mainNav").offset().top > 100) {
55
+      $("#mainNav").addClass("navbar-shrink");
56
+    } else {
57
+      $("#mainNav").removeClass("navbar-shrink");
58
+    }
59
+  };
60
+  // Collapse now if page is not at top
61
+  navbarCollapse();
62
+  // Collapse the navbar when page is scrolled
63
+  $(window).scroll(navbarCollapse);
64
+
65
+  // Floating label headings for the contact form
66
+  $(function() {
67
+    $("body")
68
+      .on("input propertychange", ".floating-label-form-group", function(e) {
69
+        $(this).toggleClass(
70
+          "floating-label-form-group-with-value",
71
+          !!$(e.target).val()
72
+        );
73
+      })
74
+      .on("focus", ".floating-label-form-group", function() {
62
         $(this).addClass("floating-label-form-group-with-focus");
75
         $(this).addClass("floating-label-form-group-with-focus");
63
-      }).on("blur", ".floating-label-form-group", function() {
76
+      })
77
+      .on("blur", ".floating-label-form-group", function() {
64
         $(this).removeClass("floating-label-form-group-with-focus");
78
         $(this).removeClass("floating-label-form-group-with-focus");
65
       });
79
       });
66
-    });
67
-  
68
-  })(jQuery); // End of use strict
69
-  
80
+  });
81
+})(jQuery); // End of use strict

+ 2
- 0
src/assets/staticData/itemsPerPage.js ファイルの表示

1
+const items = [10, 20, 50, 100]
2
+export default items

+ 52
- 0
src/components/accounts/login.vue ファイルの表示

1
+<template>
2
+	<div>
3
+		<div class="container" style="padding-top:120px; padding-left:18%;">
4
+			<div class="col-md-12" style="text-align:left">
5
+				<b-card
6
+					title="Login"
7
+					tag="article"
8
+					style="max-width: 20rem;"
9
+					class="mb-6"
10
+				>
11
+					<div class="row">
12
+						<div class="col-md-12" style="margin-bottom: 1em">
13
+							<label>Cellphone / Email</label>
14
+							<div class="input-group-prepend">
15
+								<input
16
+									class="form-control"
17
+									type="text"
18
+									name="username"
19
+								/>
20
+							</div>
21
+						</div>
22
+					</div>
23
+					<div class="row">
24
+						<div class="col-md-12" style="margin-bottom: 1em">
25
+							<label>Password</label>
26
+							<div class="input-group-prepend">
27
+								<input
28
+									class="form-control"
29
+									type="password"
30
+									name="password"
31
+								/>
32
+							</div>
33
+						</div>
34
+					</div>
35
+
36
+					<b-button variant="primary" @click="Login">Login</b-button>
37
+				</b-card>
38
+			</div>
39
+		</div>
40
+	</div>
41
+</template>
42
+
43
+<script>
44
+export default {
45
+	name: 'Login',
46
+	methods: {
47
+		Login() {
48
+			//Handle Login
49
+		},
50
+	},
51
+}
52
+</script>

+ 29
- 8
src/components/accounts/register.vue ファイルの表示

1
 <template>
1
 <template>
2
 	<div>
2
 	<div>
3
-		<br />
4
-		<br />
5
-		<br />
6
-		<br />
7
-		<br />
8
-		<div class="container">
3
+		<div class="container custompadding">
9
 			<div class="col-md-12" style="text-align:left">
4
 			<div class="col-md-12" style="text-align:left">
10
 				<h4>Register</h4>
5
 				<h4>Register</h4>
11
 				<div class="form-group row"></div>
6
 				<div class="form-group row"></div>
17
 								class="form-control"
12
 								class="form-control"
18
 								type="text"
13
 								type="text"
19
 								name="name"
14
 								name="name"
15
+								v-model="user.firstName"
20
 							/>
16
 							/>
21
 						</div>
17
 						</div>
22
 					</div>
18
 					</div>
29
 								class="form-control"
25
 								class="form-control"
30
 								type="text"
26
 								type="text"
31
 								name="Surname"
27
 								name="Surname"
28
+								v-model="user.Surname"
32
 							/>
29
 							/>
33
 						</div>
30
 						</div>
34
 					</div>
31
 					</div>
41
 								class="form-control"
38
 								class="form-control"
42
 								type="text"
39
 								type="text"
43
 								name="EmailAddress"
40
 								name="EmailAddress"
41
+								v-model="user.emailAddress"
44
 							/>
42
 							/>
45
 						</div>
43
 						</div>
46
 					</div>
44
 					</div>
53
 								class="form-control"
51
 								class="form-control"
54
 								type="text"
52
 								type="text"
55
 								name="cellnumber"
53
 								name="cellnumber"
54
+								v-model="user.cellphone"
56
 							/>
55
 							/>
57
 						</div>
56
 						</div>
58
 					</div>
57
 					</div>
65
 								class="form-control"
64
 								class="form-control"
66
 								type="password"
65
 								type="password"
67
 								name="password"
66
 								name="password"
67
+								v-model="user.password"
68
 							/>
68
 							/>
69
 						</div>
69
 						</div>
70
 					</div>
70
 					</div>
77
 								class="form-control"
77
 								class="form-control"
78
 								type="password"
78
 								type="password"
79
 								name="confPassword"
79
 								name="confPassword"
80
+								v-model="passwordCheck"
80
 							/>
81
 							/>
81
 						</div>
82
 						</div>
82
 					</div>
83
 					</div>
84
 				<div class="row">
85
 				<div class="row">
85
 					<div class="col-md-3">
86
 					<div class="col-md-3">
86
 						<button
87
 						<button
87
-							@click="SubmitData()"
88
+							@click="RegisterData()"
88
 							class="btn btn-primary btn-xl"
89
 							class="btn btn-primary btn-xl"
89
 							type="submit"
90
 							type="submit"
90
 						>
91
 						>
107
 </template>
108
 </template>
108
 
109
 
109
 <script>
110
 <script>
111
+import { mapState, mapActions } from 'vuex'
112
+//import { sha256 } from 'js-sha256'
110
 export default {
113
 export default {
111
 	name: 'registration',
114
 	name: 'registration',
115
+	data() {
116
+		return {
117
+			passwordCheck: '',
118
+		}
119
+	},
112
 	methods: {
120
 	methods: {
121
+		...mapActions('registration', ['regUser', 'getUser']),
113
 		RegisterData() {
122
 		RegisterData() {
114
-			//submit data
123
+			this.regUser(this.user).then(() => {
124
+				if (this.user.id > 0) {
125
+					this.$router.push('/login')
126
+				} else {
127
+					alert('Error')
128
+				}
129
+			})
115
 		},
130
 		},
116
 		Close() {
131
 		Close() {
117
 			this.$router.push('/')
132
 			this.$router.push('/')
118
 		},
133
 		},
119
 	},
134
 	},
135
+	computed: {
136
+		...mapState('registration', ['user']),
137
+	},
138
+	mounted() {
139
+		this.getUser(0)
140
+	},
120
 }
141
 }
121
 </script>
142
 </script>

+ 99
- 83
src/components/accounts/restaurantRegistration.vue ファイルの表示

1
 <template>
1
 <template>
2
-	<div style="text-align:left">
3
-		<h4>Restaurant Details</h4>
4
-		<div class="form-group row"></div>
5
-		<div class="row">
6
-			<div class="col-md-6" style="margin-bottom: 1em">
7
-				<label>Name</label>
8
-				<div class="input-group-prepend">
9
-					<input
10
-						class="form-control"
11
-						type="text"
12
-						name="name"
13
-						placeholder="Name"
14
-					/>
15
-				</div>
16
-			</div>
17
-		</div>
18
-		<div class="row">
19
-			<div class="col-md-6" style="margin-bottom: 1em">
20
-				<div class="input-group-prepend">
21
-					<p>Placeholder for Logo</p>
22
-					<!-- <input
23
-								class="form-control"
24
-								type="text"
25
-								name="surname"
26
-								placeholder="Surname"
27
-							/> -->
28
-				</div>
29
-			</div>
30
-		</div>
31
-		<div class="row">
32
-			<div class="col-md-6" style="margin-bottom: 1em">
33
-				<div class="input-group-prepend">
34
-					<p>Option for change</p>
35
-					<!-- Tool Tip for here: If you are part of a chain, this option will display your name along with the location -->
36
-					<!-- <input
2
+  <div>
3
+    <div class="container custompadding">
4
+      <div class="col-md-12" style="text-align:left">
5
+        <h4>Restaurant Details</h4>
6
+        <div class="form-group row"></div>
7
+        <div class="row">
8
+          <div class="col-md-6" style="margin-bottom: 1em">
9
+            <label>Name</label>
10
+            <div class="input-group-prepend">
11
+              <input class="form-control" type="text" name="name" />
12
+            </div>
13
+          </div>
14
+        </div>
15
+        <div class="row">
16
+          <div class="col-md-6" style="margin-bottom: 1em">
17
+            <label>Logo</label>
18
+            <div class="input-group-prepend">
19
+              <input type="file" name="logo" />
20
+            </div>
21
+          </div>
22
+        </div>
23
+        <div class="row">
24
+          <div class="col-md-6" style="margin-bottom: 1em">
25
+            <div class="input-group-prepend">
26
+              <b-form-checkbox switch size="lg">part of chain</b-form-checkbox>
27
+              <!-- Tool Tip for here: If you are part of a chain, this option will display your name along with the location -->
28
+              <!-- <input
37
 								class="form-control"
29
 								class="form-control"
38
 								type="text"
30
 								type="text"
39
 								name="email"
31
 								name="email"
40
 								placeholder="Email Address"
32
 								placeholder="Email Address"
41
-							/> -->
42
-				</div>
43
-			</div>
44
-		</div>
45
-		<div class="row">
46
-			<div class="col-md-6" style="margin-bottom: 1em">
47
-				<div class="input-group-prepend">
48
-					<input
49
-						class="form-control"
50
-						type="number"
51
-						name="delFee"
52
-						placeholder="Delivery Fee"
53
-					/>
54
-				</div>
55
-			</div>
56
-		</div>
57
-		<div class="row">
58
-			<div class="col-md-6" style="margin-bottom: 1em">
59
-				<div class="input-group-prepend">
60
-					<input
61
-						class="form-control"
62
-						type="number"
63
-						name="delRadius"
64
-						placeholder="Delivery Radius"
65
-					/>
66
-				</div>
67
-			</div>
68
-		</div>
69
-		<div class="row">
70
-			<div class="col-md-6" style="margin-bottom: 1em">
71
-				<div class="input-group-prepend">
72
-					<input
73
-						class="form-control"
74
-						type="password"
75
-						name="confPassword"
76
-						placeholder="Confirm Password"
77
-					/>
78
-				</div>
79
-			</div>
80
-		</div>
81
-		<div class="row">
82
-			<div class="col-md-6" style="margin-bottom: 1em">
83
-				<div class="input-group-prepend">
84
-					<P>option here to Register a Restaurant</P>
85
-				</div>
86
-			</div>
87
-		</div>
88
-	</div>
33
+              />-->
34
+            </div>
35
+          </div>
36
+        </div>
37
+        <div class="row">
38
+          <div class="col-md-6" style="margin-bottom: 1em">
39
+            <label>Delivery Fee</label>
40
+            <div class="input-group-prepend">
41
+              <input class="form-control" type="number" name="delFee" />
42
+            </div>
43
+          </div>
44
+        </div>
45
+        <div class="row">
46
+          <div class="col-md-6" style="margin-bottom: 1em">
47
+            <label>Delivery Radius</label>
48
+            <div class="input-group-prepend">
49
+              <input class="form-control" type="number" name="delRadius" />
50
+            </div>
51
+          </div>
52
+        </div>
53
+        <div class="col-md-6">
54
+          <Map />
55
+        </div>
56
+        <div class="col-md-6">
57
+          <ListView />
58
+        </div>
59
+        <!-- <div class="row">
60
+					<div class="col-md-6" style="margin-bottom: 1em">
61
+						<label>Methods Of Payment</label>
62
+						<div class="input-group-prepend">
63
+							<ul>
64
+								<li v-for="mop in mops">
65
+									<input
66
+										type="checkbox"
67
+										:id="mop.name"
68
+										:value="mop.name"
69
+										v-model="selectedUsers"
70
+									/>
71
+									<label :for="mop.name">
72
+										{{ mop.name }}</label
73
+									>
74
+								</li>
75
+							</ul>
76
+						</div>
77
+					</div> 
78
+        </div>-->
79
+      </div>
80
+    </div>
81
+  </div>
89
 </template>
82
 </template>
83
+
84
+<script>
85
+import Map from "../shared/mapSetLocation";
86
+import ListView from "../shared/listView";
87
+
88
+export default {
89
+  name: "RestaurantRegistration",
90
+  components: {
91
+    Map,
92
+    ListView
93
+  },
94
+  data() {
95
+    return {
96
+      mops: [
97
+        { name: "Credit Card" },
98
+        { name: "EFT" },
99
+        { name: "Account" },
100
+        { name: "Cash On Delivery" }
101
+      ]
102
+    };
103
+  }
104
+};
105
+</script>

+ 85
- 85
src/components/restaurants/restaurant.vue ファイルの表示

1
 <template>
1
 <template>
2
-	<div>
3
-		<br />
4
-		<br />
5
-		<br />
6
-		<br />
7
-		<br />
8
-		<div class="container">
9
-			<div class="col-md-12" style="text-align:left">
10
-				<h4>Restaurant</h4>
11
-				<div class="form-group row"></div>
12
-				<div class="row">
13
-					<div class="col-md-6" style="margin-bottom: 1em">
14
-						<div class="input-group-prepend">
15
-							<input
16
-								class="form-control"
17
-								type="text"
18
-								name="name"
19
-								placeholder="Name"
20
-							/>
21
-						</div>
22
-					</div>
23
-				</div>
24
-				<div class="row">
25
-					<div class="col-md-6" style="margin-bottom: 1em">
26
-						<div class="input-group-prepend">
27
-							<p>Placeholder for Logo</p>
28
-							<!-- <input
2
+  <div>
3
+    <br />
4
+    <br />
5
+    <br />
6
+    <br />
7
+    <br />
8
+    <div class="container">
9
+      <div class="col-md-12" style="text-align:left">
10
+        <h4>Restaurant</h4>
11
+        <div class="form-group row"></div>
12
+        <div class="row">
13
+          <div class="col-md-6" style="margin-bottom: 1em">
14
+            <div class="input-group-prepend">
15
+              <input
16
+                class="form-control"
17
+                type="text"
18
+                name="name"
19
+                placeholder="Name"
20
+              />
21
+            </div>
22
+          </div>
23
+        </div>
24
+        <div class="row">
25
+          <div class="col-md-6" style="margin-bottom: 1em">
26
+            <div class="input-group-prepend">
27
+              <p>Placeholder for Logo</p>
28
+              <!-- <input
29
 								class="form-control"
29
 								class="form-control"
30
 								type="text"
30
 								type="text"
31
 								name="surname"
31
 								name="surname"
32
 								placeholder="Surname"
32
 								placeholder="Surname"
33
 							/> -->
33
 							/> -->
34
-						</div>
35
-					</div>
36
-				</div>
37
-				<div class="row">
38
-					<div class="col-md-6" style="margin-bottom: 1em">
39
-						<div class="input-group-prepend">
40
-							<p>Option for change</p>
41
-							<!-- Tool Tip for here: If you are part of a chain, this option will display your name along with the location -->
42
-							<!-- <input
34
+            </div>
35
+          </div>
36
+        </div>
37
+        <div class="row">
38
+          <div class="col-md-6" style="margin-bottom: 1em">
39
+            <div class="input-group-prepend">
40
+              <p>Option for change</p>
41
+              <!-- Tool Tip for here: If you are part of a chain, this option will display your name along with the location -->
42
+              <!-- <input
43
 								class="form-control"
43
 								class="form-control"
44
 								type="text"
44
 								type="text"
45
 								name="email"
45
 								name="email"
46
 								placeholder="Email Address"
46
 								placeholder="Email Address"
47
 							/> -->
47
 							/> -->
48
-						</div>
49
-					</div>
50
-				</div>
51
-				<div class="row">
52
-					<div class="col-md-6" style="margin-bottom: 1em">
53
-						<div class="input-group-prepend">
54
-							<input
55
-								class="form-control"
56
-								type="number"
57
-								name="delFee"
58
-								placeholder="Delivery Fee"
59
-							/>
60
-						</div>
61
-					</div>
62
-				</div>
63
-				<div class="row">
64
-					<div class="col-md-6" style="margin-bottom: 1em">
65
-						<div class="input-group-prepend">
66
-							<input
67
-								class="form-control"
68
-								type="number"
69
-								name="delRadius"
70
-								placeholder="Delivery Radius"
71
-							/>
72
-						</div>
73
-					</div>
74
-				</div>
75
-				<div class="row">
76
-					<div class="col-md-6" style="margin-bottom: 1em">
77
-						<div class="input-group-prepend">
78
-							<input
79
-								class="form-control"
80
-								type="password"
81
-								name="confPassword"
82
-								placeholder="Confirm Password"
83
-							/>
84
-						</div>
85
-					</div>
86
-				</div>
87
-				<div class="row">
88
-					<div class="col-md-6" style="margin-bottom: 1em">
89
-						<div class="input-group-prepend">
90
-							<P>option here to Register a Restaurant</P>
91
-						</div>
92
-					</div>
93
-				</div>
94
-			</div>
95
-		</div>
96
-	</div>
48
+            </div>
49
+          </div>
50
+        </div>
51
+        <div class="row">
52
+          <div class="col-md-6" style="margin-bottom: 1em">
53
+            <div class="input-group-prepend">
54
+              <input
55
+                class="form-control"
56
+                type="number"
57
+                name="delFee"
58
+                placeholder="Delivery Fee"
59
+              />
60
+            </div>
61
+          </div>
62
+        </div>
63
+        <div class="row">
64
+          <div class="col-md-6" style="margin-bottom: 1em">
65
+            <div class="input-group-prepend">
66
+              <input
67
+                class="form-control"
68
+                type="number"
69
+                name="delRadius"
70
+                placeholder="Delivery Radius"
71
+              />
72
+            </div>
73
+          </div>
74
+        </div>
75
+        <div class="row">
76
+          <div class="col-md-6" style="margin-bottom: 1em">
77
+            <div class="input-group-prepend">
78
+              <input
79
+                class="form-control"
80
+                type="password"
81
+                name="confPassword"
82
+                placeholder="Confirm Password"
83
+              />
84
+            </div>
85
+          </div>
86
+        </div>
87
+        <div class="row">
88
+          <div class="col-md-6" style="margin-bottom: 1em">
89
+            <div class="input-group-prepend">
90
+              <P>option here to Register a Restaurant</P>
91
+            </div>
92
+          </div>
93
+        </div>
94
+      </div>
95
+    </div>
96
+  </div>
97
 </template>
97
 </template>

+ 47
- 0
src/components/shared/alert.vue ファイルの表示

1
+<template>
2
+  <div class="container">
3
+    <!-- eslint-disable max-len -->
4
+    <div class="alert mySuccess" v-if="type === 'SUCCESS'">
5
+      <eva-icon name="checkmark-outline" style="margin: 0px 20px"></eva-icon>
6
+      <strong class="color-black">{{ text }}</strong>
7
+    </div>
8
+    <div class="alert myInfo" v-if="type === 'INFO'">
9
+      <eva-icon name="info-outline" style="margin: 0px 20px"></eva-icon>
10
+      <strong class="color-black">{{ text }}</strong>
11
+    </div>
12
+    <div class="alert myWarning" v-if="type === 'WARNING'">
13
+      <eva-icon name="alert-circle-outline" style="margin: 0px 20px"></eva-icon>
14
+      <strong class="color-black">{{ text }}</strong>
15
+    </div>
16
+    <div class="alert myError" v-if="type === 'ERROR'">
17
+      <eva-icon name="slash-outline" style="margin: 0px 20px"></eva-icon>
18
+      <strong class="color-black">{{ text }}</strong>
19
+    </div>
20
+  </div>
21
+</template>
22
+
23
+<script>
24
+export default {
25
+  name: "Alert",
26
+  data() {
27
+    return {
28
+      alertTypes: {
29
+        SUCCESS: "Success",
30
+        INFO: "Info",
31
+        WARNING: "Warning",
32
+        ERROR: "Error"
33
+      }
34
+    };
35
+  },
36
+  props: {
37
+    text: null,
38
+    type: null
39
+  }
40
+};
41
+</script>
42
+
43
+<style>
44
+.color-black {
45
+  color: black;
46
+}
47
+</style>

+ 107
- 0
src/components/shared/basePagination.vue ファイルの表示

1
+<template>
2
+  <div>
3
+    <nav>
4
+      <ul class="pagination">
5
+        <li class="page-item" v-if="isPreviousButtonDisabled" @click="previousPage">
6
+          <a class="page-link" href="#" aria-label="Previous">
7
+            <span aria-hidden="true">&laquo;</span>
8
+            <span class="sr-only">Previous</span>
9
+          </a>
10
+        </li>
11
+        <li class="page-item" v-for="item in paginationItems" :key="item">
12
+          <BasePaginationItem
13
+            :pageNumber="item"
14
+            :isCurrentPage="item === currentPage"
15
+            @loadPage="onLoadPage"
16
+          />
17
+        </li>
18
+        <li class="page-item" v-if="isNextButtonDisabled" @click="nextPage">
19
+          <a class="page-link" href="#" aria-label="Next">
20
+            <span aria-hidden="true">&raquo;</span>
21
+            <span class="sr-only">Next</span>
22
+          </a>
23
+        </li>
24
+      </ul>
25
+    </nav>
26
+  </div>
27
+</template>
28
+<script>
29
+import BasePaginationItem from "./basePaginationItem.vue";
30
+
31
+export default {
32
+  components: {
33
+    BasePaginationItem
34
+  },
35
+  props: {
36
+    visiblePagesCount: {
37
+      type: Number,
38
+      default: 5
39
+    },
40
+    currentPage: {
41
+      type: Number,
42
+      required: true
43
+    },
44
+    pageCount: {
45
+      type: Number,
46
+      required: true
47
+    }
48
+  },
49
+  computed: {
50
+    isPreviousButtonDisabled() {
51
+      return this.currentPage !== 1;
52
+    },
53
+    isNextButtonDisabled() {
54
+      return this.currentPage !== this.pageCount;
55
+    },
56
+    paginationItems() {
57
+      const { currentPage } = this;
58
+      const { pageCount } = this;
59
+      const { visiblePagesCount } = this;
60
+      let pagintationItemsArray = [];
61
+      if (pageCount <= visiblePagesCount) {
62
+        let count = 1;
63
+        while (count <= pageCount) {
64
+          pagintationItemsArray.push(count);
65
+          count += 1;
66
+        }
67
+        return pagintationItemsArray;
68
+      }
69
+      const visiblePagesThreshold = (visiblePagesCount - 1) / 2;
70
+      pagintationItemsArray = Array(this.visiblePagesCount - 1).fill(0);
71
+      if (currentPage <= visiblePagesThreshold + 1) {
72
+        pagintationItemsArray[0] = 1;
73
+        const pagintationItems = pagintationItemsArray.map(
74
+          (paginationTrigger, index) => pagintationItemsArray[0] + index
75
+        );
76
+        pagintationItems.push(pageCount);
77
+        return pagintationItems;
78
+      }
79
+      if (currentPage >= pageCount - visiblePagesThreshold + 1) {
80
+        const pagintationItems = pagintationItemsArray.map(
81
+          (paginationTrigger, index) => pageCount - index
82
+        );
83
+        pagintationItems.reverse().unshift(1);
84
+        return pagintationItems;
85
+      }
86
+      pagintationItemsArray[0] = currentPage - visiblePagesThreshold + 1;
87
+      const pagintationItems = pagintationItemsArray.map(
88
+        (paginationTrigger, index) => pagintationItemsArray[0] + index
89
+      );
90
+      pagintationItems.unshift(1);
91
+      pagintationItems[pagintationItems.length - 1] = pageCount;
92
+      return pagintationItems;
93
+    }
94
+  },
95
+  methods: {
96
+    onLoadPage(value) {
97
+      this.$emit("loadPage", value);
98
+    },
99
+    nextPage() {
100
+      this.$emit("nextPage");
101
+    },
102
+    previousPage() {
103
+      this.$emit("previousPage");
104
+    }
105
+  }
106
+};
107
+</script>

+ 31
- 0
src/components/shared/basePaginationItem.vue ファイルの表示

1
+<template>
2
+  <div :class="isCurrentPage ? 'page-item active' : 'page-item'">
3
+    <div v-if="isCurrentPage">
4
+      <span class="page-link disabled">{{pageNumber}}</span>
5
+    </div>
6
+    <div v-else @click="onClick">
7
+      <a class="page-link">{{pageNumber}}</a>
8
+    </div>
9
+  </div>
10
+</template>
11
+<script>
12
+export default {
13
+  props: {
14
+    pageNumber: {
15
+      type: Number,
16
+      required: true
17
+    },
18
+    isCurrentPage: undefined
19
+  },
20
+  methods: {
21
+    onClick() {
22
+      this.$emit("loadPage", this.pageNumber);
23
+    }
24
+  }
25
+};
26
+</script>
27
+<style scoped>
28
+.isCurrentPage {
29
+  cursor: arrow;
30
+}
31
+</style>

+ 34
- 0
src/components/shared/checkItem.vue ファイルの表示

1
+<template>
2
+  <div class="row p-2" @click="checkItem">
3
+    <div class="custom-control custom-checkbox mar-l-15">
4
+      <input type="checkbox" class="custom-control-input mar-l-15" :checked="Show" />
5
+      <label class="custom-control-label">{{title}}</label>
6
+    </div>
7
+  </div>
8
+</template>
9
+
10
+<script>
11
+export default {
12
+  props: {
13
+    title: undefined,
14
+    show: {
15
+      default: false
16
+    }
17
+  },
18
+  methods: {
19
+    checkItem() {
20
+      this.$emit("checkItem", this.title, !this.show);
21
+    }
22
+  },
23
+  computed: {
24
+    Show() {
25
+      return this.show;
26
+    }
27
+  }
28
+};
29
+</script>
30
+<style>
31
+.mar-l-15 {
32
+  margin-left: 15px;
33
+}
34
+</style>

+ 28
- 28
src/components/shared/home.vue ファイルの表示

1
 <template>
1
 <template>
2
-	<div class="col-md-12">
3
-		<header class="masthead bg-primary text-white text-center">
4
-			<div class="container d-flex align-items-center flex-column">
5
-				<!-- Masthead Avatar Image--><img
6
-					class="masthead-avatar mb-5"
7
-					src="../../assets/assets/img/avataaars.svg"
8
-					alt=""
9
-				/><!-- Masthead Heading-->
10
-				<h1 class="masthead-heading text-uppercase mb-0">
11
-					Start Bootstrap
12
-				</h1>
13
-				<!-- Icon Divider-->
14
-				<div class="divider-custom divider-light">
15
-					<div class="divider-custom-line"></div>
16
-					<div class="divider-custom-icon">
17
-						<i class="fas fa-star"></i>
18
-					</div>
19
-					<div class="divider-custom-line"></div>
20
-				</div>
21
-				<!-- Masthead Subheading-->
22
-				<p class="masthead-subheading font-weight-light mb-0">
23
-					Graphic Artist - Web Designer - Illustrator
24
-				</p>
25
-			</div>
26
-		</header>
27
-	</div>
2
+  <div class="col-md-12">
3
+    <header class="masthead bg-primary text-white text-center">
4
+      <div class="container d-flex align-items-center flex-column">
5
+        <!-- Masthead Avatar Image--><img
6
+          class="masthead-avatar mb-5"
7
+          src="../../assets/assets/img/avataaars.svg"
8
+          alt=""
9
+        /><!-- Masthead Heading-->
10
+        <h1 class="masthead-heading text-uppercase mb-0">
11
+          Start Bootstrap
12
+        </h1>
13
+        <!-- Icon Divider-->
14
+        <div class="divider-custom divider-light">
15
+          <div class="divider-custom-line"></div>
16
+          <div class="divider-custom-icon">
17
+            <i class="fas fa-star"></i>
18
+          </div>
19
+          <div class="divider-custom-line"></div>
20
+        </div>
21
+        <!-- Masthead Subheading-->
22
+        <p class="masthead-subheading font-weight-light mb-0">
23
+          Graphic Artist - Web Designer - Illustrator
24
+        </p>
25
+      </div>
26
+    </header>
27
+  </div>
28
 </template>
28
 </template>
29
 
29
 
30
 <script>
30
 <script>
31
 export default {
31
 export default {
32
-	name: 'home',
33
-}
32
+  name: "home"
33
+};
34
 </script>
34
 </script>

+ 532
- 0
src/components/shared/listView.vue ファイルの表示

1
+<template>
2
+  <div>
3
+    <div style="height:5px"></div>
4
+    <div class="d-flex justify-content-between table-title">
5
+      <div class="p-2" v-if="!hideSearch">
6
+        <input v-model="searchItem" class="form-control" placeholder="Search...." />
7
+      </div>
8
+      <div class="p-2" v-if="title">
9
+        <h2>{{ title }}</h2>
10
+      </div>
11
+      <div class="p-2">
12
+        <div class="d-flex flex-row">
13
+          <div class="p2" v-if="showColumnChooser">
14
+            <div
15
+              class="btn btn-primary myBackground btn-width cursor-pointer"
16
+              data-toggle="modal"
17
+              data-target="#myModal"
18
+            >Column Chooser</div>
19
+            <div class="col-md-12">
20
+              <div id="myModal" class="modal fade" role="dialog">
21
+                <div class="modal-dialog modal-lg">
22
+                  <!-- Modal content-->
23
+                  <div class="modal-content">
24
+                    <div class="modal-header">
25
+                      <h5>Column Chooser</h5>
26
+                      <button type="button" class="close" data-dismiss="modal">&times;</button>
27
+                    </div>
28
+                    <div style="margin-left:50px; margin-right:50px;margin-bottom:50px;">
29
+                      <ListViewControl :items="allColumn" @checkItem="checkItem" />
30
+                    </div>
31
+                  </div>
32
+                </div>
33
+              </div>
34
+            </div>
35
+          </div>
36
+          <div class="p2" v-if="selectedItems.length > 0">
37
+            <div
38
+              class="btn btn-primary myBackground btn-width cursor-pointer"
39
+              @click="onClearSelected()"
40
+            >Clear Selected</div>
41
+          </div>
42
+          <div class="p2" v-if="showNew">
43
+            <div class="btn btn-primary myBackground btn-width cursor-pointer" @click="onNew()">New</div>
44
+          </div>
45
+        </div>
46
+      </div>
47
+    </div>
48
+    <div style="height:5px"></div>
49
+    <div v-if="items && items.length > 0" class="table-responsive">
50
+      <table
51
+        id="table"
52
+        :class="{ 'table table-hover': 1 === 1, 'table-sm': compact, 'table-bordered': bordered }"
53
+      >
54
+        <thead>
55
+          <tr class="dnd-moved">
56
+            <th v-for="(column, c) in Columns" :key="c">
57
+              <div
58
+                @click="sortBy(column)"
59
+                @mouseover="hover = c"
60
+                @mouseleave="hover = -1"
61
+                :class="{ active: hover === c }"
62
+              >
63
+                <div class="d-flex bd-highlight">
64
+                  <div
65
+                    v-if="displayHeaders.length === 0"
66
+                    class="p-2 w-100 bd-highlight"
67
+                  >{{ column | toProper }}</div>
68
+                  <div
69
+                    v-else
70
+                    class="p-2 w-100 bd-highlight"
71
+                  >{{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}</div>
72
+                  <div class="p-2 flex-shrink-1 bd-highlight">
73
+                    <img
74
+                      src="../../../public/img/sort-up.png"
75
+                      height="8px;"
76
+                      v-if="sortKey === column && reverse"
77
+                    />
78
+                    <img
79
+                      src="../../../public/img/sort-down.png"
80
+                      height="8px;"
81
+                      v-if="sortKey === column && !reverse"
82
+                    />
83
+                  </div>
84
+                </div>
85
+              </div>
86
+            </th>
87
+            <th v-if="showCustomAction"></th>
88
+            <th v-if="editable"></th>
89
+            <th v-if="deleteable"></th>
90
+          </tr>
91
+        </thead>
92
+        <tbody class="my-table">
93
+          <tr
94
+            v-for="(item, i) in DisplayItems"
95
+            :key="i"
96
+            @click="onRowClick(item, i)"
97
+            :class="{ selected: isSelected(i), 'cursor-pointer': allowSelect }"
98
+          >
99
+            <td v-for="(column, c) in Columns" :key="c">
100
+              <div
101
+                v-if="displayFormats.length === 0"
102
+              >{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
103
+              <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'date'">
104
+                <div
105
+                  v-if="item[column] !== '0001-01-01T00:00:00'"
106
+                >{{ isObject(item[column]) ? item[column].display : item[column] | toDate }}</div>
107
+              </div>
108
+              <div
109
+                v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'"
110
+              >{{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}</div>
111
+              <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'image'">
112
+                <img :src="item[column]" style="height:100px; width:100px; object-fit: cover;" />
113
+              </div>
114
+              <div v-else>{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
115
+            </td>
116
+            <td v-if="showCustomAction" class="my-width">
117
+              <button
118
+                type="button"
119
+                class="btn my-btn"
120
+                @click="onCustomClick(item)"
121
+              >{{ CustomActionHeading }}</button>
122
+            </td>
123
+            <td v-if="editable" class="my-width">
124
+              <button type="button" class="btn my-btn" @click="onEdit(item)">Edit</button>
125
+            </td>
126
+            <td v-if="deleteable" class="my-width">
127
+              <button type="button" class="btn my-btn" @click="onDelete(item)">Delete</button>
128
+            </td>
129
+          </tr>
130
+        </tbody>
131
+      </table>
132
+      <div class="d-flex justify-content-between" v-if="showPager">
133
+        <div class="p-1">
134
+          {{
135
+          currentPage +
136
+          " / " +
137
+          PageCount +
138
+          (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
139
+          }}
140
+        </div>
141
+        <div class="p-1">
142
+          <BasePagination
143
+            :currentPage="currentPage"
144
+            :pageCount="PageCount"
145
+            @nextPage="pageChangeHandle('next')"
146
+            @previousPage="pageChangeHandle('previous')"
147
+            @loadPage="pageChangeHandle"
148
+          />
149
+        </div>
150
+        <div class="p-2">
151
+          <div class="d-flex flex-row">
152
+            <div>
153
+              <select
154
+                class="form-control"
155
+                v-model="visibleItemsPerPageCount"
156
+                @change="onChangeItemsPerPage()"
157
+              >
158
+                <option v-for="(item, i) in itemsPerPageList" :key="i">{{ item }}</option>
159
+              </select>
160
+            </div>
161
+          </div>
162
+        </div>
163
+      </div>
164
+    </div>
165
+    <div v-else>
166
+      <Alert :text="'No items found'" :type="'INFO'" />
167
+    </div>
168
+  </div>
169
+</template>
170
+
171
+<script>
172
+import _ from "lodash";
173
+import ItemsPerPageList from "../../assets/staticData/itemsPerPage";
174
+import BasePagination from "./basePagination.vue";
175
+import Alert from "./alert.vue";
176
+import ListViewControl from "./listViewControl.vue";
177
+
178
+export default {
179
+  components: {
180
+    BasePagination,
181
+    Alert,
182
+    ListViewControl
183
+  },
184
+  mounted() {
185
+    if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
186
+      const [startItem] = this.itemsPerPageList;
187
+      this.visibleItemsPerPageCount = startItem;
188
+    }
189
+    this.getInitColumn();
190
+  },
191
+  props: {
192
+    compact: {
193
+      default: true
194
+    },
195
+    allowSelect: {
196
+      default: true
197
+    },
198
+    allowMultipleSelect: {
199
+      default: false
200
+    },
201
+    hideSearch: {
202
+      default: false
203
+    },
204
+    showNew: {
205
+      default: true
206
+    },
207
+    items: undefined,
208
+    editable: {
209
+      default: false
210
+    },
211
+    deleteable: {
212
+      default: false
213
+    },
214
+    columnCount: {
215
+      default: 6
216
+    },
217
+    showPager: {
218
+      default: true
219
+    },
220
+    title: {
221
+      default: undefined
222
+    },
223
+    sortKey: {
224
+      default: "id"
225
+    },
226
+    hideItemCount: {
227
+      default: false
228
+    },
229
+    currentPage: {
230
+      default: 1
231
+    },
232
+    bordered: {
233
+      default: true
234
+    },
235
+    striped: {
236
+      default: true
237
+    },
238
+    showColumnChooser: {
239
+      default: true
240
+    },
241
+    displayColumns: {
242
+      default: []
243
+    },
244
+    displayFormats: {
245
+      default: []
246
+    },
247
+    displayHeaders: {
248
+      default: []
249
+    },
250
+    showCustomAction: {
251
+      default: false
252
+    },
253
+    CustomActionHeading: {
254
+      default: ""
255
+    },
256
+    CustomActionCondition: {
257
+      default: ""
258
+    }
259
+  },
260
+  data() {
261
+    return {
262
+      hover: -1,
263
+      selectedItems: [],
264
+      showControl: false,
265
+      reverse: false,
266
+      searchItem: "",
267
+      visibleItemsPerPageCount: 20,
268
+      itemsPerPageList: ItemsPerPageList,
269
+      visibleColumn: [],
270
+      allColumn: []
271
+    };
272
+  },
273
+  methods: {
274
+    checkItem(column, show) {
275
+      const list = [];
276
+      for (const i in this.allColumn) {
277
+        const item = this.allColumn[i];
278
+        if (item && item.column === column) {
279
+          item.show = show;
280
+        }
281
+        list.push(item);
282
+      }
283
+      this.allColumn = list;
284
+    },
285
+    getInitColumn() {
286
+      const listAll = [];
287
+      if (this.items) {
288
+        for (const i in Object.keys(this.items)) {
289
+          const item = this.items[i];
290
+          for (const o in Object.keys(item)) {
291
+            if (
292
+              !listAll.includes(Object.keys(item)[o]) &&
293
+              !Array.isArray(Object.values(item)[o])
294
+            ) {
295
+              const columnName = Object.keys(item)[o];
296
+              if (!listAll.some(x => x.column === columnName)) {
297
+                listAll.push({
298
+                  column: columnName,
299
+                  show: _.filter(listAll, x => x.show).length < this.columnCount
300
+                });
301
+              }
302
+            }
303
+          }
304
+        }
305
+      }
306
+      this.allColumn = listAll;
307
+    },
308
+    onClearSelected() {
309
+      this.selectedItems = [];
310
+      this.$emit("onClearSelected");
311
+    },
312
+    isSelected(i) {
313
+      const ind = this.getActualIndex(i);
314
+      return _.some(this.selectedItems, x => x === ind);
315
+    },
316
+    onNew() {
317
+      this.$emit("onNew");
318
+    },
319
+    isObject(item) {
320
+      return !!item && item.constructor === Object;
321
+    },
322
+    isDate(item) {
323
+      return !!item && item.constructor === Date;
324
+    },
325
+    isDecimal(item) {
326
+      if (!!item && item.constructor === Number && item.indexOf(".") > 0) {
327
+        return true;
328
+      }
329
+      return false;
330
+    },
331
+    isImage(item) {
332
+      return (
333
+        !!item &&
334
+        item.constructor === String &&
335
+        item.length > 9 &&
336
+        item.substring(0, 9) === "data:image"
337
+      );
338
+    },
339
+    onEdit(item) {
340
+      this.$emit("onEdit", item);
341
+    },
342
+    onDelete(item) {
343
+      this.$emit("onDelete", item);
344
+    },
345
+    onCustomClick(item) {
346
+      this.$emit("onCustomClick", item);
347
+    },
348
+    onRowClick(item, i) {
349
+      const ind = this.getActualIndex(i);
350
+      if (_.some(this.selectedItems, x => x === ind)) {
351
+        this.selectedItems = this.selectedItems.filter(x => x !== ind);
352
+      } else {
353
+        if (!this.allowMultipleSelect) {
354
+          this.selectedItems = [];
355
+        }
356
+        this.selectedItems.push(item);
357
+      }
358
+      this.$emit("onRowClick", this.selectedItems);
359
+    },
360
+    getActualIndex(index) {
361
+      return (this.currentPage - 1) * this.visibleItemsPerPageCount + index;
362
+    },
363
+    changeColumn(title, checked) {
364
+      if (checked) {
365
+        this.myColumns.push(title);
366
+      } else {
367
+        const ind = this.myColumns.indexOf(title);
368
+        if (ind > -1) {
369
+          this.myColumns.splice(ind, 1);
370
+        }
371
+      }
372
+    },
373
+    onControlVisibilityChange() {
374
+      this.showControl = !this.showControl;
375
+    },
376
+    sortBy(sortKey) {
377
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
378
+      this.sortKey = sortKey;
379
+    },
380
+    async pageChangeHandle(value) {
381
+      console.log(value);
382
+      switch (value) {
383
+        case "next":
384
+          this.currentPage += 1;
385
+          break;
386
+        case "previous":
387
+          this.currentPage -= 1;
388
+          break;
389
+        default:
390
+          this.currentPage = value;
391
+      }
392
+    },
393
+    onChangeItemsPerPage() {
394
+      if (this.currentPage !== 1) {
395
+        this.currentPage = 1;
396
+      }
397
+    },
398
+    inArray(array, value) {
399
+      const lenght = array.length;
400
+      for (let i = 0; i < lenght; i++) {
401
+        if (array[i] === value) return true;
402
+      }
403
+      return false;
404
+    }
405
+  },
406
+  computed: {
407
+    ListWidth() {
408
+      if (this.showControl) {
409
+        return "col-md-9";
410
+      }
411
+      return "col-md-12";
412
+    },
413
+    SortDirection() {
414
+      return this.reverse ? "desc" : "asc";
415
+    },
416
+    PageCount() {
417
+      return this.visibleItemsPerPageCount !== 0
418
+        ? Math.ceil(this.FilteredItems.length / this.visibleItemsPerPageCount)
419
+        : 1;
420
+    },
421
+    Columns() {
422
+      const listColumns = [];
423
+      if (!this.allColumn || this.allColumn.length === 0) {
424
+        this.getInitColumn();
425
+      }
426
+      if (this.displayColumns.length > 0) {
427
+        for (let i = 0; i < this.displayColumns.length; i++) {
428
+          listColumns.push(this.displayColumns[i]);
429
+        }
430
+      } else {
431
+        const list = _.filter(this.allColumn, x => x.show);
432
+        for (const i in list) {
433
+          const item = list[i];
434
+          if (item) {
435
+            listColumns.push(item.column);
436
+          }
437
+        }
438
+      }
439
+      return listColumns;
440
+    },
441
+    AllColumns() {
442
+      const list = [];
443
+      return list;
444
+    },
445
+    FilteredItems() {
446
+      const list = _.filter(this.items, item =>
447
+        Object.values(item).some(
448
+          i =>
449
+            JSON.stringify(i)
450
+              .toLowerCase()
451
+              .indexOf(this.searchItem.toLowerCase()) > -1
452
+        )
453
+      );
454
+      return _.orderBy(list, this.sortKey, this.SortDirection);
455
+    },
456
+    DisplayItems() {
457
+      const list = this.FilteredItems;
458
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
459
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
460
+      if (endSlice > list.length) {
461
+        endSlice = list.length;
462
+      }
463
+      return list.slice(startSlice, endSlice);
464
+    }
465
+    //GetAllColumn() {}
466
+  }
467
+};
468
+</script>
469
+<style scoped>
470
+th[draggable] a,
471
+th[draggable] {
472
+  cursor: move;
473
+}
474
+th[draggable] a:hover,
475
+th[draggable] a {
476
+  display: block;
477
+  text-decoration: none;
478
+  color: #333333;
479
+}
480
+.table-striped > tbody > tr:nth-child(2n + 1) > td,
481
+.table-striped > tbody > tr:nth-child(2n + 1) > th {
482
+  background-color: rgba(225, 225, 225, 0.8);
483
+}
484
+.active {
485
+  background-color: rgba(255, 255, 255, 0.5);
486
+  cursor: pointer;
487
+}
488
+.table > tbody > tr > td {
489
+  vertical-align: middle;
490
+}
491
+.my-width {
492
+  width: 20px;
493
+}
494
+.drag {
495
+  background-color: rgba(0, 255, 0, 0.35);
496
+  opacity: 0.25;
497
+}
498
+.dnd-drag {
499
+  opacity: 0.25;
500
+}
501
+.over {
502
+  background-color: rgba(0, 0, 255, 0.35);
503
+}
504
+.my-border {
505
+  border: solid 3px silver;
506
+}
507
+.selected {
508
+  background-color: rgba(96, 203, 235, 0.5);
509
+  border: white 2px double;
510
+}
511
+.selected:hover {
512
+  background-color: rgba(96, 203, 235, 0.85);
513
+}
514
+.btn-width {
515
+  width: 125px;
516
+}
517
+.table-title {
518
+  padding: 5px;
519
+  border: rgba(200, 200, 200, 0.66) double 2px;
520
+  border-radius: 5px;
521
+  background-color: rgba(96, 203, 235, 0.25);
522
+}
523
+.table-title:hover {
524
+  background-color: rgba(96, 203, 235, 0.4);
525
+}
526
+.table-header {
527
+  background-color: rgba(200, 200, 200, 0.66);
528
+}
529
+.my-table {
530
+  border: rgba(150, 150, 150, 0.75) 3px double;
531
+}
532
+</style>

+ 53
- 0
src/components/shared/listViewControl.vue ファイルの表示

1
+<template>
2
+  <div class="container">
3
+    <div class="offset-3 col-md-6">
4
+      <input v-model="searchItem" class="form-control" placeholder="Search...." />
5
+    </div>
6
+    <hr />
7
+    <div class="row">
8
+      <div v-for="item in items" :key="item" class="col-md-4">
9
+        <div :class="{'inSearch': isInSelected(item)}">
10
+          <CheckItem :title="item.column" :show="item.show" @checkItem="checkItem" />
11
+        </div>
12
+      </div>
13
+    </div>
14
+  </div>
15
+</template>
16
+<script>
17
+import CheckItem from "./checkItem.vue";
18
+
19
+export default {
20
+  components: {
21
+    CheckItem
22
+  },
23
+  data() {
24
+    return {
25
+      searchItem: undefined
26
+    };
27
+  },
28
+  props: {
29
+    items: undefined
30
+  },
31
+  methods: {
32
+    isInSelected(i) {
33
+      if (this.searchItem && this.searchItem.length > 0) {
34
+        return (
35
+          i.column.toLowerCase().indexOf(this.searchItem.toLowerCase()) > -1
36
+        );
37
+      }
38
+      return false;
39
+    },
40
+    checkItem(column, show) {
41
+      this.$emit("checkItem", column, show);
42
+    }
43
+  },
44
+  computed: {}
45
+};
46
+</script>
47
+<style>
48
+.inSearch {
49
+  border: 1px solid rgba(50, 50, 50, 0.5);
50
+  border-radius: 10px;
51
+  background-color: rgba(225, 225, 225, 0.6);
52
+}
53
+</style>

+ 119
- 0
src/components/shared/mapSetLocation.vue ファイルの表示

1
+<template>
2
+  <div>
3
+    <label>Location</label>
4
+    <div class="input-group-prepend">
5
+      <gmap-autocomplete class="form-control" @place_changed="setPlace"></gmap-autocomplete>
6
+      <button class="btn btn-primary btn-l" @click="addMarker">Add</button>
7
+      <br />
8
+    </div>
9
+    <br />
10
+    <gmap-map :center="coordinates" :zoom="18" style="width:100%;  height: 400px;">
11
+      <gmap-marker
12
+        :key="index"
13
+        v-for="(m, index) in markers"
14
+        :position="m.position"
15
+        :draggable="true"
16
+        @click="center = m.position"
17
+      ></gmap-marker>
18
+    </gmap-map>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+export default {
24
+  data() {
25
+    return {
26
+      coordinates: {
27
+        lat: 0,
28
+        lng: 0
29
+      },
30
+      center: { lat: 0, lng: 0 },
31
+      markers: [],
32
+      places: [],
33
+      currentPlace: {},
34
+      streetNumber: "",
35
+      streetName: "",
36
+      suburb: "",
37
+      city: "",
38
+      province: "",
39
+      country: "",
40
+      postalCode: ""
41
+    };
42
+  },
43
+  created() {
44
+    this.$getLocation({})
45
+      .then(coord => {
46
+        this.coordinates = coord;
47
+        //this.markers.push({ position: coord })
48
+      })
49
+      .catch(error => alert(error));
50
+  },
51
+
52
+  mounted() {
53
+    this.geolocate();
54
+  },
55
+
56
+  methods: {
57
+    setPlace(place) {
58
+      this.currentPlace = place;
59
+
60
+      this.streetNumber = "";
61
+      this.streetName = "";
62
+      this.suburb = "";
63
+      this.city = "";
64
+      this.province = "";
65
+      this.country = "";
66
+      this.postalCode = "";
67
+
68
+      for (let i = 0; i < place.address_components.length; i++) {
69
+        if (place.address_components[i].types[0] === "street_number") {
70
+          this.streetNumber = place.address_components[i].long_name;
71
+        }
72
+        if (place.address_components[i].types[0] === "route") {
73
+          this.streetName = place.address_components[i].long_name;
74
+        }
75
+        if (place.address_components[i].types[0] === "sublocality_level_1") {
76
+          this.suburb = place.address_components[i].long_name;
77
+        }
78
+        if (place.address_components[i].types[0] === "locality") {
79
+          this.city = place.address_components[i].long_name;
80
+        }
81
+        if (
82
+          place.address_components[i].types[0] === "administrative_area_level_1"
83
+        ) {
84
+          this.province = place.address_components[i].long_name;
85
+        }
86
+        if (place.address_components[i].types[0] === "country") {
87
+          this.country = place.address_components[i].long_name;
88
+        }
89
+        if (place.address_components[i].types[0] === "postal_code") {
90
+          this.postalCode = place.address_components[i].long_name;
91
+        }
92
+      }
93
+    },
94
+    addMarker() {
95
+      if (this.currentPlace) {
96
+        const marker = {
97
+          lat: this.currentPlace.geometry.location.lat(),
98
+          lng: this.currentPlace.geometry.location.lng()
99
+        };
100
+        this.markers = [];
101
+        this.places = [];
102
+        this.markers.push({ position: marker });
103
+        this.places.push(this.currentPlace);
104
+        this.center = marker;
105
+        this.coordinates = marker;
106
+        this.currentPlace = null;
107
+      }
108
+    },
109
+    geolocate: function() {
110
+      navigator.geolocation.getCurrentPosition(position => {
111
+        this.center = {
112
+          lat: position.coords.latitude,
113
+          lng: position.coords.longitude
114
+        };
115
+      });
116
+    }
117
+  }
118
+};
119
+</script>

+ 40
- 47
src/components/shared/navBar.vue ファイルの表示

1
 <template>
1
 <template>
2
-	<nav
3
-		class="navbar navbar-expand-lg bg-secondary text-uppercase fixed-top"
4
-		id="mainNav"
5
-	>
6
-		<div class="container">
7
-			<a class="navbar-brand js-scroll-trigger" @click="routerGoTo('/')"
8
-				>Get Food</a
9
-			>
10
-			<button
11
-				class="navbar-toggler navbar-toggler-right text-uppercase font-weight-bold bg-primary text-white rounded"
12
-				type="button"
13
-				data-toggle="collapse"
14
-				data-target="#navbarResponsive"
15
-				aria-controls="navbarResponsive"
16
-				aria-expanded="false"
17
-				aria-label="Toggle navigation"
18
-			>
19
-				Menu
20
-				<i class="fas fa-bars"></i>
21
-			</button>
22
-			<div class="collapse navbar-collapse" id="navbarResponsive">
23
-				<ul class="navbar-nav ml-auto">
24
-					<li class="nav-item mx-0 mx-lg-1">
25
-						<a
26
-							class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger"
27
-							@click="routerGoTo('/Registration')"
28
-							>Register
29
-						</a>
30
-					</li>
31
-					<li class="nav-item mx-0 mx-lg-1">
32
-						<a
33
-							class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger"
34
-							@click="routerGoTo('/login')"
35
-							>Login</a
36
-						>
37
-					</li>
38
-				</ul>
39
-			</div>
40
-		</div>
41
-	</nav>
2
+  <nav class="navbar navbar-expand-lg bg-secondary text-uppercase fixed-top" id="mainNav">
3
+    <div class="container">
4
+      <a class="navbar-brand js-scroll-trigger" @click="routerGoTo('/')">Get Food</a>
5
+      <button
6
+        class="navbar-toggler navbar-toggler-right text-uppercase font-weight-bold bg-primary text-white rounded"
7
+        type="button"
8
+        data-toggle="collapse"
9
+        data-target="#navbarResponsive"
10
+        aria-controls="navbarResponsive"
11
+        aria-expanded="false"
12
+        aria-label="Toggle navigation"
13
+      >
14
+        Menu
15
+        <i class="fas fa-bars"></i>
16
+      </button>
17
+      <div class="collapse navbar-collapse" id="navbarResponsive">
18
+        <ul class="navbar-nav ml-auto">
19
+          <li class="nav-item mx-0 mx-lg-1">
20
+            <a
21
+              class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger"
22
+              @click="routerGoTo('/Registration')"
23
+            >Register</a>
24
+          </li>
25
+          <li class="nav-item mx-0 mx-lg-1">
26
+            <a
27
+              class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger"
28
+              @click="routerGoTo('/Login')"
29
+            >Login</a>
30
+          </li>
31
+        </ul>
32
+      </div>
33
+    </div>
34
+  </nav>
42
 </template>
35
 </template>
43
 
36
 
44
 <script>
37
 <script>
45
 export default {
38
 export default {
46
-	name: 'navbar',
47
-	methods: {
48
-		routerGoTo(path) {
49
-			this.$emit('routerGoTo', path)
50
-		},
51
-	},
52
-}
39
+  name: "navbar",
40
+  methods: {
41
+    routerGoTo(path) {
42
+      this.$emit("routerGoTo", path);
43
+    }
44
+  }
45
+};
53
 </script>
46
 </script>

+ 23
- 1
src/main.js ファイルの表示

1
 import Vue from 'vue'
1
 import Vue from 'vue'
2
 import App from './App.vue'
2
 import App from './App.vue'
3
 import router from './router'
3
 import router from './router'
4
+import store from './store'
5
+import axios from 'axios'
6
+import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
4
 
7
 
5
-Vue.config.productionTip = false
8
+import 'bootstrap/dist/css/bootstrap.css'
9
+import 'bootstrap-vue/dist/bootstrap-vue.css'
10
+import VueGeolocation from 'vue-browser-geolocation'
11
+Vue.use(VueGeolocation)
12
+import * as VueGoogleMaps from 'vue2-google-maps'
13
+Vue.use(VueGoogleMaps, {
14
+	load: {
15
+		key: 'AIzaSyC1Ksf24t03oxHkQYb-DymF9HipgGP30ao',
16
+		libraries: 'places', // necessary for places input
17
+	},
18
+})
6
 
19
 
20
+Vue.config.productionTip = false
21
+axios.defaults.baseURL = 'http://localhost:58847/'
7
 require('./assets/css/styles.css')
22
 require('./assets/css/styles.css')
8
 
23
 
24
+Vue.prototype.$axios = axios
25
+Vue.prototype.$http = axios
26
+
9
 new Vue({
27
 new Vue({
10
 	router,
28
 	router,
29
+	store,
11
 	render: (h) => h(App),
30
 	render: (h) => h(App),
12
 }).$mount('#app')
31
 }).$mount('#app')
32
+
33
+Vue.use(BootstrapVue)
34
+Vue.use(IconsPlugin)

+ 12
- 0
src/router/index.js ファイルの表示

3
 import Home from '../components/shared/home.vue'
3
 import Home from '../components/shared/home.vue'
4
 
4
 
5
 import Registration from '../components/accounts/register.vue'
5
 import Registration from '../components/accounts/register.vue'
6
+import Login from '../components/accounts/login.vue'
7
+import RegisterRestaurant from '../components/accounts/restaurantRegistration.vue'
6
 
8
 
7
 Vue.use(VueRouter)
9
 Vue.use(VueRouter)
8
 
10
 
17
 		name: 'Registration',
19
 		name: 'Registration',
18
 		component: Registration,
20
 		component: Registration,
19
 	},
21
 	},
22
+	{
23
+		path: '/Login',
24
+		name: 'Login',
25
+		component: Login,
26
+	},
27
+	{
28
+		path: '/RegisterRestaurant',
29
+		name: 'RegisterRestaurant',
30
+		component: RegisterRestaurant,
31
+	},
20
 ]
32
 ]
21
 
33
 
22
 const router = new VueRouter({
34
 const router = new VueRouter({

+ 15
- 0
src/store/index.js ファイルの表示

1
+import Vue from 'vue'
2
+import Vuex from 'vuex'
3
+
4
+import Registration from './users/registration'
5
+
6
+Vue.use(Vuex)
7
+
8
+export default new Vuex.Store({
9
+	state: {},
10
+	mutations: {},
11
+	actions: {},
12
+	modules: {
13
+		registration: Registration,
14
+	},
15
+})

+ 30
- 0
src/store/users/registration.js ファイルの表示

1
+import axios from 'axios'
2
+import { sha256 } from 'js-sha256'
3
+
4
+export default {
5
+	namespaced: true,
6
+	state: {
7
+		user: {},
8
+	},
9
+	mutations: {
10
+		addUser(state, user) {
11
+			state.user = user
12
+		},
13
+	},
14
+	getters: {},
15
+	actions: {
16
+		getUser({ commit }, userID) {
17
+			axios
18
+				.get(`/api/user/${userID}`)
19
+				.then((result) => commit('addUser', result.data))
20
+				.catch(console.error)
21
+		},
22
+		regUser({ commit }, user) {
23
+			user.password = sha256(user.password + '≡∆≤≥√∞ProVision')
24
+			axios
25
+				.post('/api/user', user)
26
+				.then((result) => commit('addUser', result.data))
27
+				.catch(console.error)
28
+		},
29
+	},
30
+}

読み込み中…
キャンセル
保存