Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5dab72d8
authored
Feb 27, 2021
by
Jonathan Reinink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up code formatting
1 parent
f3b8bba0
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
87 additions
and
61 deletions
.eslintrc.js
.prettierrc
package-lock.json
package.json
resources/js/Pages/Auth/Login.vue
resources/js/Pages/Contacts/Create.vue
resources/js/Pages/Contacts/Edit.vue
resources/js/Pages/Contacts/Index.vue
resources/js/Pages/Organizations/Create.vue
resources/js/Pages/Organizations/Edit.vue
resources/js/Pages/Organizations/Index.vue
resources/js/Pages/Users/Create.vue
resources/js/Pages/Users/Edit.vue
resources/js/Pages/Users/Index.vue
resources/js/Shared/Dropdown.vue
resources/js/Shared/FileInput.vue
resources/js/Shared/Layout.vue
resources/js/Shared/MainMenu.vue
resources/js/Shared/SearchFilter.vue
resources/js/Shared/TextInput.vue
resources/js/app.js
.eslintrc.js
View file @
5dab72d
module
.
exports
=
{
module
.
exports
=
{
extends
:
[
extends
:
[
'eslint:recommended'
,
'plugin:vue/recommended'
],
'eslint:recommended'
,
parserOptions
:
{
'plugin:vue/recommended'
,
ecmaVersion
:
2020
,
],
sourceType
:
'module'
,
},
env
:
{
amd
:
true
,
browser
:
true
,
es6
:
true
,
},
rules
:
{
rules
:
{
"indent"
:
[
'error'
,
2
],
indent
:
[
'error'
,
2
],
'quotes'
:
[
'warn'
,
'single'
],
quotes
:
[
'warn'
,
'single'
],
'semi'
:
[
'warn'
,
'never'
],
semi
:
[
'warn'
,
'never'
],
'no-unused-vars'
:
[
'error'
,
{
vars
:
'all'
,
args
:
'after-used'
,
ignoreRestSiblings
:
true
}],
'comma-dangle'
:
[
'warn'
,
'always-multiline'
],
'comma-dangle'
:
[
'warn'
,
'always-multiline'
],
'vue/max-attributes-per-line'
:
false
,
'vue/max-attributes-per-line'
:
'off'
,
'vue/require-default-prop'
:
false
,
'vue/require-default-prop'
:
'off'
,
'vue/singleline-html-element-content-newline'
:
false
,
'vue/singleline-html-element-content-newline'
:
'off'
,
}
'vue/html-self-closing'
:
[
'warn'
,
{
html
:
{
void
:
'always'
,
normal
:
'always'
,
component
:
'always'
,
},
},
],
},
}
}
.prettierrc
0 → 100644
View file @
5dab72d
{
"printWidth": 10000,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"htmlWhitespaceSensitivity": "css"
}
package-lock.json
View file @
5dab72d
This diff could not be displayed because it is too large.
package.json
View file @
5dab72d
...
@@ -15,16 +15,16 @@
...
@@ -15,16 +15,16 @@
"@inertiajs/inertia-vue"
:
"^0.5.5"
,
"@inertiajs/inertia-vue"
:
"^0.5.5"
,
"@inertiajs/progress"
:
"^0.2.4"
,
"@inertiajs/progress"
:
"^0.2.4"
,
"cross-env"
:
"^5.2.1"
,
"cross-env"
:
"^5.2.1"
,
"eslint"
:
"^
5.16
.0"
,
"eslint"
:
"^
6.8
.0"
,
"eslint-plugin-vue"
:
"^
5.2.3
"
,
"eslint-plugin-vue"
:
"^
7.5.0
"
,
"laravel-mix"
:
"^5.0.
1
"
,
"laravel-mix"
:
"^5.0.
9
"
,
"lodash"
:
"^4.17.21"
,
"lodash"
:
"^4.17.21"
,
"popper.js"
:
"^1.16.0"
,
"popper.js"
:
"^1.16.0"
,
"portal-vue"
:
"^1.5.1"
,
"portal-vue"
:
"^1.5.1"
,
"postcss-import"
:
"^12.0.1"
,
"postcss-import"
:
"^12.0.1"
,
"postcss-nesting"
:
"^7.0.1"
,
"postcss-nesting"
:
"^7.0.1"
,
"resolve-url-loader"
:
"^2.3.2"
,
"resolve-url-loader"
:
"^2.3.2"
,
"tailwindcss"
:
"^1.
2.0-canary.5
"
,
"tailwindcss"
:
"^1.
9.6
"
,
"vue"
:
"^2.6.11"
,
"vue"
:
"^2.6.11"
,
"vue-meta"
:
"^2.3.1"
,
"vue-meta"
:
"^2.3.1"
,
"vue-template-compiler"
:
"^2.6.11"
"vue-template-compiler"
:
"^2.6.11"
...
...
resources/js/Pages/Auth/Login.vue
View file @
5dab72d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<text-input
v-model=
"form.email"
:error=
"form.errors.email"
class=
"mt-10"
label=
"Email"
type=
"email"
autofocus
autocapitalize=
"off"
/>
<text-input
v-model=
"form.email"
:error=
"form.errors.email"
class=
"mt-10"
label=
"Email"
type=
"email"
autofocus
autocapitalize=
"off"
/>
<text-input
v-model=
"form.password"
:error=
"form.errors.password"
class=
"mt-6"
label=
"Password"
type=
"password"
/>
<text-input
v-model=
"form.password"
:error=
"form.errors.password"
class=
"mt-6"
label=
"Password"
type=
"password"
/>
<label
class=
"mt-6 select-none flex items-center"
for=
"remember"
>
<label
class=
"mt-6 select-none flex items-center"
for=
"remember"
>
<input
id=
"remember"
v-model=
"form.remember"
class=
"mr-1"
type=
"checkbox"
>
<input
id=
"remember"
v-model=
"form.remember"
class=
"mr-1"
type=
"checkbox"
/
>
<span
class=
"text-sm"
>
Remember Me
</span>
<span
class=
"text-sm"
>
Remember Me
</span>
</label>
</label>
</div>
</div>
...
@@ -23,9 +23,9 @@
...
@@ -23,9 +23,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
LoadingButton
from
'@/Shared/LoadingButton'
import
Logo
from
'@/Shared/Logo'
import
Logo
from
'@/Shared/Logo'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Login'
},
metaInfo
:
{
title
:
'Login'
},
...
...
resources/js/Pages/Contacts/Create.vue
View file @
5dab72d
...
@@ -35,18 +35,18 @@
...
@@ -35,18 +35,18 @@
<
script
>
<
script
>
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Create Contact'
},
metaInfo
:
{
title
:
'Create Contact'
},
layout
:
Layout
,
components
:
{
components
:
{
LoadingButton
,
LoadingButton
,
SelectInput
,
SelectInput
,
TextInput
,
TextInput
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
organizations
:
Array
,
organizations
:
Array
,
},
},
...
...
resources/js/Pages/Contacts/Edit.vue
View file @
5dab72d
...
@@ -40,9 +40,9 @@
...
@@ -40,9 +40,9 @@
<
script
>
<
script
>
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
export
default
{
export
default
{
...
@@ -51,13 +51,13 @@ export default {
...
@@ -51,13 +51,13 @@ export default {
title
:
`
${
this
.
form
.
first_name
}
${
this
.
form
.
last_name
}
`
,
title
:
`
${
this
.
form
.
first_name
}
${
this
.
form
.
last_name
}
`
,
}
}
},
},
layout
:
Layout
,
components
:
{
components
:
{
LoadingButton
,
LoadingButton
,
SelectInput
,
SelectInput
,
TextInput
,
TextInput
,
TrashedMessage
,
TrashedMessage
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
errors
:
Object
,
errors
:
Object
,
contact
:
Object
,
contact
:
Object
,
...
...
resources/js/Pages/Contacts/Index.vue
View file @
5dab72d
...
@@ -64,21 +64,21 @@
...
@@ -64,21 +64,21 @@
<
script
>
<
script
>
import
Icon
from
'@/Shared/Icon'
import
Icon
from
'@/Shared/Icon'
import
pickBy
from
'lodash/pickBy'
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
throttle
from
'lodash/throttle'
import
mapValues
from
'lodash/mapValues'
import
mapValues
from
'lodash/mapValues'
import
Pagination
from
'@/Shared/Pagination'
import
Pagination
from
'@/Shared/Pagination'
import
pickBy
from
'lodash/pickBy'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
throttle
from
'lodash/throttle'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Contacts'
},
metaInfo
:
{
title
:
'Contacts'
},
layout
:
Layout
,
components
:
{
components
:
{
Icon
,
Icon
,
Pagination
,
Pagination
,
SearchFilter
,
SearchFilter
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
contacts
:
Object
,
contacts
:
Object
,
filters
:
Object
,
filters
:
Object
,
...
...
resources/js/Pages/Organizations/Create.vue
View file @
5dab72d
...
@@ -30,18 +30,18 @@
...
@@ -30,18 +30,18 @@
<
script
>
<
script
>
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Create Organization'
},
metaInfo
:
{
title
:
'Create Organization'
},
layout
:
Layout
,
components
:
{
components
:
{
LoadingButton
,
LoadingButton
,
SelectInput
,
SelectInput
,
TextInput
,
TextInput
,
},
},
layout
:
Layout
,
remember
:
'form'
,
remember
:
'form'
,
data
()
{
data
()
{
return
{
return
{
...
...
resources/js/Pages/Organizations/Edit.vue
View file @
5dab72d
...
@@ -72,16 +72,15 @@
...
@@ -72,16 +72,15 @@
<
script
>
<
script
>
import
Icon
from
'@/Shared/Icon'
import
Icon
from
'@/Shared/Icon'
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
export
default
{
export
default
{
metaInfo
()
{
metaInfo
()
{
return
{
title
:
this
.
form
.
name
}
return
{
title
:
this
.
form
.
name
}
},
},
layout
:
Layout
,
components
:
{
components
:
{
Icon
,
Icon
,
LoadingButton
,
LoadingButton
,
...
@@ -89,6 +88,7 @@ export default {
...
@@ -89,6 +88,7 @@ export default {
TextInput
,
TextInput
,
TrashedMessage
,
TrashedMessage
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
organization
:
Object
,
organization
:
Object
,
},
},
...
...
resources/js/Pages/Organizations/Index.vue
View file @
5dab72d
...
@@ -56,21 +56,21 @@
...
@@ -56,21 +56,21 @@
<
script
>
<
script
>
import
Icon
from
'@/Shared/Icon'
import
Icon
from
'@/Shared/Icon'
import
pickBy
from
'lodash/pickBy'
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
throttle
from
'lodash/throttle'
import
mapValues
from
'lodash/mapValues'
import
mapValues
from
'lodash/mapValues'
import
Pagination
from
'@/Shared/Pagination'
import
Pagination
from
'@/Shared/Pagination'
import
pickBy
from
'lodash/pickBy'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
throttle
from
'lodash/throttle'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Organizations'
},
metaInfo
:
{
title
:
'Organizations'
},
layout
:
Layout
,
components
:
{
components
:
{
Icon
,
Icon
,
Pagination
,
Pagination
,
SearchFilter
,
SearchFilter
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
organizations
:
Object
,
organizations
:
Object
,
filters
:
Object
,
filters
:
Object
,
...
...
resources/js/Pages/Users/Create.vue
View file @
5dab72d
...
@@ -27,20 +27,20 @@
...
@@ -27,20 +27,20 @@
<
script
>
<
script
>
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
FileInput
from
'@/Shared/FileInput'
import
FileInput
from
'@/Shared/FileInput'
import
TextInput
from
'@/Shared/TextInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Create User'
},
metaInfo
:
{
title
:
'Create User'
},
layout
:
Layout
,
components
:
{
components
:
{
FileInput
,
LoadingButton
,
LoadingButton
,
SelectInput
,
SelectInput
,
TextInput
,
TextInput
,
FileInput
,
},
},
layout
:
Layout
,
remember
:
'form'
,
remember
:
'form'
,
data
()
{
data
()
{
return
{
return
{
...
...
resources/js/Pages/Users/Edit.vue
View file @
5dab72d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<span
class=
"text-indigo-400 font-medium"
>
/
</span>
<span
class=
"text-indigo-400 font-medium"
>
/
</span>
{{
form
.
first_name
}}
{{
form
.
last_name
}}
{{
form
.
first_name
}}
{{
form
.
last_name
}}
</h1>
</h1>
<img
v-if=
"user.photo"
class=
"block w-8 h-8 rounded-full ml-4"
:src=
"user.photo"
>
<img
v-if=
"user.photo"
class=
"block w-8 h-8 rounded-full ml-4"
:src=
"user.photo"
/
>
</div>
</div>
<trashed-message
v-if=
"user.deleted_at"
class=
"mb-6"
@
restore=
"restore"
>
<trashed-message
v-if=
"user.deleted_at"
class=
"mb-6"
@
restore=
"restore"
>
This user has been deleted.
This user has been deleted.
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
<
script
>
<
script
>
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
SelectInput
from
'@/Shared/SelectInput'
import
TextInput
from
'@/Shared/TextInput'
import
TextInput
from
'@/Shared/TextInput'
import
FileInput
from
'@/Shared/FileInput'
import
FileInput
from
'@/Shared/FileInput'
import
SelectInput
from
'@/Shared/SelectInput'
import
LoadingButton
from
'@/Shared/LoadingButton'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
import
TrashedMessage
from
'@/Shared/TrashedMessage'
export
default
{
export
default
{
...
@@ -47,14 +47,14 @@ export default {
...
@@ -47,14 +47,14 @@ export default {
title
:
`
${
this
.
form
.
first_name
}
${
this
.
form
.
last_name
}
`
,
title
:
`
${
this
.
form
.
first_name
}
${
this
.
form
.
last_name
}
`
,
}
}
},
},
layout
:
Layout
,
components
:
{
components
:
{
FileInput
,
LoadingButton
,
LoadingButton
,
SelectInput
,
SelectInput
,
TextInput
,
TextInput
,
FileInput
,
TrashedMessage
,
TrashedMessage
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
user
:
Object
,
user
:
Object
,
},
},
...
...
resources/js/Pages/Users/Index.vue
View file @
5dab72d
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<tr
v-for=
"user in users"
:key=
"user.id"
class=
"hover:bg-gray-100 focus-within:bg-gray-100"
>
<tr
v-for=
"user in users"
:key=
"user.id"
class=
"hover:bg-gray-100 focus-within:bg-gray-100"
>
<td
class=
"border-t"
>
<td
class=
"border-t"
>
<inertia-link
class=
"px-6 py-4 flex items-center focus:text-indigo-500"
:href=
"route('users.edit', user.id)"
>
<inertia-link
class=
"px-6 py-4 flex items-center focus:text-indigo-500"
:href=
"route('users.edit', user.id)"
>
<img
v-if=
"user.photo"
class=
"block w-5 h-5 rounded-full mr-2 -my-2"
:src=
"user.photo"
>
<img
v-if=
"user.photo"
class=
"block w-5 h-5 rounded-full mr-2 -my-2"
:src=
"user.photo"
/
>
{{
user
.
name
}}
{{
user
.
name
}}
<icon
v-if=
"user.deleted_at"
name=
"trash"
class=
"flex-shrink-0 w-3 h-3 fill-gray-400 ml-2"
/>
<icon
v-if=
"user.deleted_at"
name=
"trash"
class=
"flex-shrink-0 w-3 h-3 fill-gray-400 ml-2"
/>
</inertia-link>
</inertia-link>
...
@@ -62,19 +62,19 @@
...
@@ -62,19 +62,19 @@
<
script
>
<
script
>
import
Icon
from
'@/Shared/Icon'
import
Icon
from
'@/Shared/Icon'
import
pickBy
from
'lodash/pickBy'
import
Layout
from
'@/Shared/Layout'
import
Layout
from
'@/Shared/Layout'
import
throttle
from
'lodash/throttle'
import
mapValues
from
'lodash/mapValues'
import
mapValues
from
'lodash/mapValues'
import
pickBy
from
'lodash/pickBy'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
SearchFilter
from
'@/Shared/SearchFilter'
import
throttle
from
'lodash/throttle'
export
default
{
export
default
{
metaInfo
:
{
title
:
'Users'
},
metaInfo
:
{
title
:
'Users'
},
layout
:
Layout
,
components
:
{
components
:
{
Icon
,
Icon
,
SearchFilter
,
SearchFilter
,
},
},
layout
:
Layout
,
props
:
{
props
:
{
users
:
Array
,
users
:
Array
,
filters
:
Object
,
filters
:
Object
,
...
...
resources/js/Shared/Dropdown.vue
View file @
5dab72d
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
document
.
addEventListener
(
'keydown'
,
(
e
)
=>
{
document
.
addEventListener
(
'keydown'
,
e
=>
{
if
(
e
.
keyCode
===
27
)
{
if
(
e
.
keyCode
===
27
)
{
this
.
show
=
false
this
.
show
=
false
}
}
...
...
resources/js/Shared/FileInput.vue
View file @
5dab72d
...
@@ -2,14 +2,16 @@
...
@@ -2,14 +2,16 @@
<div>
<div>
<label
v-if=
"label"
class=
"form-label"
>
{{
label
}}
:
</label>
<label
v-if=
"label"
class=
"form-label"
>
{{
label
}}
:
</label>
<div
class=
"form-input p-0"
:class=
"
{ error: errors.length }">
<div
class=
"form-input p-0"
:class=
"
{ error: errors.length }">
<input
ref=
"file"
type=
"file"
:accept=
"accept"
class=
"hidden"
@
change=
"change"
>
<input
ref=
"file"
type=
"file"
:accept=
"accept"
class=
"hidden"
@
change=
"change"
/
>
<div
v-if=
"!value"
class=
"p-2"
>
<div
v-if=
"!value"
class=
"p-2"
>
<button
type=
"button"
class=
"px-4 py-1 bg-gray-500 hover:bg-gray-700 rounded-sm text-xs font-medium text-white"
@
click=
"browse"
>
<button
type=
"button"
class=
"px-4 py-1 bg-gray-500 hover:bg-gray-700 rounded-sm text-xs font-medium text-white"
@
click=
"browse"
>
Browse
Browse
</button>
</button>
</div>
</div>
<div
v-else
class=
"flex items-center justify-between p-2"
>
<div
v-else
class=
"flex items-center justify-between p-2"
>
<div
class=
"flex-1 pr-1"
>
{{
value
.
name
}}
<span
class=
"text-gray-500 text-xs"
>
(
{{
filesize
(
value
.
size
)
}}
)
</span></div>
<div
class=
"flex-1 pr-1"
>
{{
value
.
name
}}
<span
class=
"text-gray-500 text-xs"
>
(
{{
filesize
(
value
.
size
)
}}
)
</span>
</div>
<button
type=
"button"
class=
"px-4 py-1 bg-gray-500 hover:bg-gray-700 rounded-sm text-xs font-medium text-white"
@
click=
"remove"
>
<button
type=
"button"
class=
"px-4 py-1 bg-gray-500 hover:bg-gray-700 rounded-sm text-xs font-medium text-white"
@
click=
"remove"
>
Remove
Remove
</button>
</button>
...
@@ -40,7 +42,7 @@ export default {
...
@@ -40,7 +42,7 @@ export default {
methods
:
{
methods
:
{
filesize
(
size
)
{
filesize
(
size
)
{
var
i
=
Math
.
floor
(
Math
.
log
(
size
)
/
Math
.
log
(
1024
))
var
i
=
Math
.
floor
(
Math
.
log
(
size
)
/
Math
.
log
(
1024
))
return
(
size
/
Math
.
pow
(
1024
,
i
)
).
toFixed
(
2
)
*
1
+
' '
+
[
'B'
,
'kB'
,
'MB'
,
'GB'
,
'TB'
][
i
]
return
(
size
/
Math
.
pow
(
1024
,
i
)).
toFixed
(
2
)
*
1
+
' '
+
[
'B'
,
'kB'
,
'MB'
,
'GB'
,
'TB'
][
i
]
},
},
browse
()
{
browse
()
{
this
.
$refs
.
file
.
click
()
this
.
$refs
.
file
.
click
()
...
...
resources/js/Shared/Layout.vue
View file @
5dab72d
...
@@ -46,11 +46,11 @@
...
@@ -46,11 +46,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Dropdown
from
'@/Shared/Dropdown'
import
FlashMessages
from
'@/Shared/FlashMessages'
import
Icon
from
'@/Shared/Icon'
import
Icon
from
'@/Shared/Icon'
import
Logo
from
'@/Shared/Logo'
import
Logo
from
'@/Shared/Logo'
import
Dropdown
from
'@/Shared/Dropdown'
import
MainMenu
from
'@/Shared/MainMenu'
import
MainMenu
from
'@/Shared/MainMenu'
import
FlashMessages
from
'@/Shared/FlashMessages'
export
default
{
export
default
{
components
:
{
components
:
{
...
...
resources/js/Shared/MainMenu.vue
View file @
5dab72d
...
@@ -37,11 +37,9 @@ export default {
...
@@ -37,11 +37,9 @@ export default {
methods
:
{
methods
:
{
isUrl
(...
urls
)
{
isUrl
(...
urls
)
{
let
currentUrl
=
this
.
$page
.
url
.
substr
(
1
)
let
currentUrl
=
this
.
$page
.
url
.
substr
(
1
)
if
(
urls
[
0
]
===
''
)
{
if
(
urls
[
0
]
===
''
)
{
return
currentUrl
===
''
return
currentUrl
===
''
}
}
return
urls
.
filter
(
url
=>
currentUrl
.
startsWith
(
url
)).
length
return
urls
.
filter
(
url
=>
currentUrl
.
startsWith
(
url
)).
length
},
},
},
},
...
...
resources/js/Shared/SearchFilter.vue
View file @
5dab72d
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<slot
/>
<slot
/>
</div>
</div>
</dropdown>
</dropdown>
<input
class=
"relative w-full px-6 py-3 rounded-r focus:shadow-outline"
autocomplete=
"off"
type=
"text"
name=
"search"
placeholder=
"Search…"
:value=
"value"
@
input=
"$emit('input', $event.target.value)"
>
<input
class=
"relative w-full px-6 py-3 rounded-r focus:shadow-outline"
autocomplete=
"off"
type=
"text"
name=
"search"
placeholder=
"Search…"
:value=
"value"
@
input=
"$emit('input', $event.target.value)"
/
>
</div>
</div>
<button
class=
"ml-3 text-sm text-gray-500 hover:text-gray-700 focus:text-indigo-500"
type=
"button"
@
click=
"$emit('reset')"
>
Reset
</button>
<button
class=
"ml-3 text-sm text-gray-500 hover:text-gray-700 focus:text-indigo-500"
type=
"button"
@
click=
"$emit('reset')"
>
Reset
</button>
</div>
</div>
...
...
resources/js/Shared/TextInput.vue
View file @
5dab72d
<
template
>
<
template
>
<div>
<div>
<label
v-if=
"label"
class=
"form-label"
:for=
"id"
>
{{
label
}}
:
</label>
<label
v-if=
"label"
class=
"form-label"
:for=
"id"
>
{{
label
}}
:
</label>
<input
:id=
"id"
ref=
"input"
v-bind=
"$attrs"
class=
"form-input"
:class=
"
{ error: error }" :type="type" :value="value" @input="$emit('input', $event.target.value)">
<input
:id=
"id"
ref=
"input"
v-bind=
"$attrs"
class=
"form-input"
:class=
"
{ error: error }" :type="type" :value="value" @input="$emit('input', $event.target.value)"
/
>
<div
v-if=
"error"
class=
"form-error"
>
{{
error
}}
</div>
<div
v-if=
"error"
class=
"form-error"
>
{{
error
}}
</div>
</div>
</div>
</
template
>
</
template
>
...
...
resources/js/app.js
View file @
5dab72d
...
@@ -16,9 +16,10 @@ const el = document.getElementById('app')
...
@@ -16,9 +16,10 @@ const el = document.getElementById('app')
new
Vue
({
new
Vue
({
metaInfo
:
{
metaInfo
:
{
titleTemplate
:
(
title
)
=>
title
?
`
${
title
}
- Ping CRM`
:
'Ping CRM'
titleTemplate
:
title
=>
(
title
?
`
${
title
}
- Ping CRM`
:
'Ping CRM'
),
},
},
render
:
h
=>
h
(
App
,
{
render
:
h
=>
h
(
App
,
{
props
:
{
props
:
{
initialPage
:
JSON
.
parse
(
el
.
dataset
.
page
),
initialPage
:
JSON
.
parse
(
el
.
dataset
.
page
),
resolveComponent
:
name
=>
import
(
`@/Pages/
${
name
}
`
).
then
(
module
=>
module
.
default
),
resolveComponent
:
name
=>
import
(
`@/Pages/
${
name
}
`
).
then
(
module
=>
module
.
default
),
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment