Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

5 changed files with 23 additions and 24 deletions

6
.env.example Executable file → Normal file
View File

@ -1,11 +1,8 @@
APP_NAME="Your SwissCar GmbH - AutoManager"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://automngr.test
APP_PORT=80
USER_1_EMAIL=test@salloum.pm
USER_1_PW=abc123
LOG_CHANNEL=stack
LOG_LEVEL=debug
@ -16,7 +13,6 @@ DB_PORT=3306
DB_DATABASE=automngr
DB_USERNAME="sail"
DB_PASSWORD="password"
FORWARD_DB_PORT=3306
BROADCAST_DRIVER=log
CACHE_DRIVER=file

12
database/seeders/DatabaseSeeder.php Executable file → Normal file
View File

@ -36,20 +36,20 @@ class DatabaseSeeder extends Seeder
User::factory()->create([
'name' => 'Nadim Salloum',
'email' => env('USER_1_EMAIL', 'test@test.ch'),
'password' => bcrypt(env('USER_1_PW', 'abc123')),
'email' => env('USER_1_EMAIL'),
'password' => bcrypt(env('USER_1_PW')),
]);
User::factory()->create([
'name' => 'Mohamad Salloum',
'email' => env('USER_2_EMAIL', 'test2@test.ch'),
'password' => bcrypt(env('USER_2_PW', 'abc123')),
'email' => env('USER_2_EMAIL'),
'password' => bcrypt(env('USER_2_PW')),
]);
User::factory()->create([
'name' => 'Nadim Salloum',
'email' => env('USER_3_EMAIL', 'test3@test.ch'),
'password' => bcrypt(env('USER_3_PW', 'abc123')),
'email' => env('USER_3_EMAIL'),
'password' => bcrypt(env('USER_3_PW')),
]);
foreach ($this->getBrands() as $brandItem) {

0
public/css/app.css vendored Executable file → Normal file
View File

17
public/js/app.js vendored Executable file → Normal file
View File

@ -23001,14 +23001,17 @@ __webpack_require__.r(__webpack_exports__);
var _this = this;
if (newVal !== oldVal && newVal.length === 4 && this.form.country === 'CH') {
axios.get("https://openplzapi.org/ch/Localities?postalCode=".concat(newVal)).then(function (response) {
var data = response.data;
/*if (records.length > 1) {
records = records.filter(rec => rec.geometry);
}*/
axios.get("https://swisspost.opendatasoft.com/api/records/1.0/search/?dataset=plz_verzeichnis_v2&q=&facet=ortbez18&refine.postleitzahl=".concat(newVal)).then(function (response) {
var records = response.data.records;
if (data[0]) {
_this.form.city = data[0].name;
if (records.length > 1) {
records = records.filter(function (rec) {
return rec.geometry;
});
}
if (records[0]) {
_this.form.city = records[0].fields.ortbez18;
}
});
}

View File

@ -91,14 +91,14 @@ export default {
methods: {
fetchCity(newVal, oldVal) {
if (newVal !== oldVal && newVal.length === 4 && this.form.country === 'CH') {
axios.get(`https://openplzapi.org/ch/Localities?postalCode=${newVal}`)
axios.get(`https://swisspost.opendatasoft.com/api/records/1.0/search/?dataset=plz_verzeichnis_v2&q=&facet=ortbez18&refine.postleitzahl=${newVal}`)
.then((response) => {
let data = response.data;
/*if (records.length > 1) {
let records = response.data.records;
if (records.length > 1) {
records = records.filter(rec => rec.geometry);
}*/
if (data[0]) {
this.form.city = data[0].name;
}
if (records[0]) {
this.form.city = records[0].fields.ortbez18;
}
});
}