-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: manage contact addresses (monicahq/chandler#32)
- Loading branch information
Showing
155 changed files
with
5,934 additions
and
4,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,49 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es6': true | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
'extends': [ | ||
'plugin:vue/recommended' | ||
], | ||
'parserOptions': { | ||
'ecmaVersion': 12, | ||
'sourceType': 'module' | ||
extends: ['plugin:vue/recommended'], | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
}, | ||
'plugins': [ | ||
'vue', | ||
], | ||
'rules': { | ||
'array-bracket-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'indent': [ | ||
'error', | ||
2 | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
'unix' | ||
], | ||
plugins: ['vue'], | ||
rules: { | ||
'array-bracket-spacing': ['error', 'never'], | ||
indent: ['error', 2], | ||
'linebreak-style': ['error', 'unix'], | ||
'no-trailing-spaces': [ | ||
'error', | ||
{ | ||
'ignoreComments': true, | ||
'skipBlankLines': true | ||
} | ||
], | ||
'quotes': [ | ||
'error', | ||
'single' | ||
], | ||
'semi': [ | ||
'error', | ||
'always' | ||
ignoreComments: true, | ||
skipBlankLines: true, | ||
}, | ||
], | ||
quotes: ['error', 'single'], | ||
semi: ['error', 'always'], | ||
'semi-spacing': [ | ||
'error', | ||
{ | ||
'after': true, | ||
'before': false | ||
} | ||
], | ||
'semi-style': [ | ||
'error', | ||
'last' | ||
after: true, | ||
before: false, | ||
}, | ||
], | ||
'semi-style': ['error', 'last'], | ||
|
||
// strongly recommended | ||
'vue/component-name-in-template-casing': [ | ||
'error', | ||
'kebab-case' | ||
], | ||
'vue/component-tags-order': [ | ||
'warn', | ||
{ | ||
'order': [['style', 'template'], 'script'] | ||
} | ||
], | ||
'vue/component-name-in-template-casing': ['error', 'kebab-case'], | ||
'vue/html-end-tags': 'error', | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
'html': { | ||
'normal': 'always', | ||
'void': 'never' | ||
} | ||
} | ||
html: { | ||
normal: 'always', | ||
void: 'never', | ||
}, | ||
}, | ||
], | ||
'vue/no-v-model-argument': 0, | ||
'vue/no-v-html': 0, | ||
'vue/max-attributes-per-line': [ | ||
// https://vuejs.org/v2/style-guide/#Multi-attribute-elements-strongly-recommended | ||
'error', | ||
{ | ||
'singleline': 5, | ||
'multiline': { | ||
'max': 5, | ||
'allowFirstLine': true | ||
} | ||
} | ||
], | ||
'vue/singleline-html-element-content-newline': ['error', { | ||
'ignoreWhenNoAttributes': true, | ||
'ignoreWhenEmpty': true, | ||
'ignores': ['pre', 'textarea', 'inertia-link', 'a', 'p', 'li'] | ||
}] | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public/js | ||
public/css | ||
storage | ||
vendor | ||
node_modules | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...Controllers/Settings/Personalize/Modules/ViewHelpers/PersonalizeModuleIndexViewHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Settings\Personalize\Modules\ViewHelpers; | ||
|
||
use App\Models\Module; | ||
use App\Models\Account; | ||
|
||
class PersonalizeModuleIndexViewHelper | ||
{ | ||
public static function data(Account $account): array | ||
{ | ||
$modules = $account->modules() | ||
->orderBy('name', 'asc') | ||
->get(); | ||
|
||
$collection = collect(); | ||
foreach ($modules as $module) { | ||
$collection->push(self::dtoModule($module)); | ||
} | ||
|
||
return [ | ||
'modules' => $collection, | ||
'url' => [ | ||
'settings' => route('settings.index'), | ||
'personalize' => route('settings.personalize.index'), | ||
'module_store' => route('settings.personalize.module.store'), | ||
], | ||
]; | ||
} | ||
|
||
public static function dtoModule(Module $module): array | ||
{ | ||
return [ | ||
'id' => $module->id, | ||
'name' => $module->name, | ||
'type' => $module->type, | ||
'reserved_to_contact_information' => $module->reserved_to_contact_information, | ||
'can_be_deleted' => $module->can_be_deleted, | ||
'url' => [ | ||
'update' => route('settings.personalize.module.update', [ | ||
'module' => $module->id, | ||
]), | ||
'destroy' => route('settings.personalize.module.destroy', [ | ||
'module' => $module->id, | ||
]), | ||
], | ||
]; | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.