Fix column sorting bug #121

This commit is contained in:
Will Browning 2021-03-10 15:04:00 +00:00
parent 95e4e61291
commit 83497191a4
6 changed files with 823 additions and 986 deletions

View file

@ -21,7 +21,7 @@
"laravel/ui": "^3.0",
"maatwebsite/excel": "^3.1",
"mews/captcha": "^3.0.0",
"php-mime-mail-parser/php-mime-mail-parser": "^6.0",
"php-mime-mail-parser/php-mime-mail-parser": "^7.0",
"pragmarx/google2fa-laravel": "^1.3",
"pragmarx/version": "^1.2",
"ramsey/uuid": "^4.0"

72
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bdcbd8efdc5742523773da7f59994f9a",
"content-hash": "2db32dc1685fd5601486a0fc7a5e8077",
"packages": [
{
"name": "asbiin/laravel-webauthn",
@ -1844,16 +1844,16 @@
},
{
"name": "laravel/framework",
"version": "v8.31.0",
"version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "2aa5c2488d25178ebc097052c7897a0e463ddc35"
"reference": "7c37b64f8153c16b6406f5c28cf37828ebbe8846"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/2aa5c2488d25178ebc097052c7897a0e463ddc35",
"reference": "2aa5c2488d25178ebc097052c7897a0e463ddc35",
"url": "https://api.github.com/repos/laravel/framework/zipball/7c37b64f8153c16b6406f5c28cf37828ebbe8846",
"reference": "7c37b64f8153c16b6406f5c28cf37828ebbe8846",
"shasum": ""
},
"require": {
@ -2008,7 +2008,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-03-04T15:22:36+00:00"
"time": "2021-03-09T15:37:45+00:00"
},
{
"name": "laravel/passport",
@ -4180,21 +4180,21 @@
},
{
"name": "php-mime-mail-parser/php-mime-mail-parser",
"version": "6.0.0",
"version": "7.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-mime-mail-parser/php-mime-mail-parser.git",
"reference": "28fd7d44bb1796784dfab3fd1c76ab1021a248ea"
"reference": "9d09a017f3f103fec8456211a4a538b80e0eca0d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-mime-mail-parser/php-mime-mail-parser/zipball/28fd7d44bb1796784dfab3fd1c76ab1021a248ea",
"reference": "28fd7d44bb1796784dfab3fd1c76ab1021a248ea",
"url": "https://api.github.com/repos/php-mime-mail-parser/php-mime-mail-parser/zipball/9d09a017f3f103fec8456211a4a538b80e0eca0d",
"reference": "9d09a017f3f103fec8456211a4a538b80e0eca0d",
"shasum": ""
},
"require": {
"ext-mailparse": "*",
"php": "^7.2"
"php": "^7.2|^8.0"
},
"replace": {
"exorus/php-mime-mail-parser": "*",
@ -4202,8 +4202,7 @@
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/php-token-stream": "^3.0",
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
@ -4260,9 +4259,15 @@
],
"support": {
"issues": "https://github.com/php-mime-mail-parser/php-mime-mail-parser/issues",
"source": "https://github.com/php-mime-mail-parser/php-mime-mail-parser/tree/master"
"source": "https://github.com/php-mime-mail-parser/php-mime-mail-parser/tree/7.0.0"
},
"time": "2020-01-14T12:45:01+00:00"
"funding": [
{
"url": "https://github.com/eXorus",
"type": "github"
}
],
"time": "2021-02-25T17:21:57+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
@ -5648,20 +5653,20 @@
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.6",
"version": "v6.2.7",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "d2791ff0b73247cdc2096b14f5580aba40c12bff"
"reference": "15f7faf8508e04471f666633addacf54c0ab5933"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d2791ff0b73247cdc2096b14f5580aba40c12bff",
"reference": "d2791ff0b73247cdc2096b14f5580aba40c12bff",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933",
"reference": "15f7faf8508e04471f666633addacf54c0ab5933",
"shasum": ""
},
"require": {
"egulias/email-validator": "^2.0",
"egulias/email-validator": "^2.0|^3.1",
"php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10",
@ -5707,7 +5712,7 @@
],
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.6"
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7"
},
"funding": [
{
@ -5719,7 +5724,7 @@
"type": "tidelift"
}
],
"time": "2021-03-05T12:08:49+00:00"
"time": "2021-03-09T12:30:35+00:00"
},
{
"name": "symfony/console",
@ -8759,30 +8764,35 @@
},
{
"name": "webmozart/assert",
"version": "1.9.1",
"version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0 || ^8.0",
"php": "^7.2 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
"vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
"phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@ -8806,9 +8816,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.9.1"
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
},
"time": "2020-07-08T17:02:28+00:00"
"time": "2021-03-09T10:59:23+00:00"
}
],
"packages-dev": [

View file

@ -5,9 +5,9 @@ current:
major: 0
minor: 7
patch: 1
prerelease: 3-gc8fc31f
prerelease: 5-g95e4e61
buildmetadata: ''
commit: c8fc31
commit: 95e4e6
timestamp:
year: 2020
month: 10

1420
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@
"lodash": "^4.17.20",
"portal-vue": "^2.1.7",
"postcss": "^8.1.14",
"postcss-import": "^12.0.1",
"postcss-import": "^14.0.0",
"resolve-url-loader": "^3.1.2",
"tailwindcss": "^2.0.1",
"tippy.js": "^6.2.7",
@ -33,7 +33,7 @@
"vuedraggable": "^2.24.2"
},
"devDependencies": {
"husky": "^4.3.8",
"husky": "^5.1.3",
"lint-staged": "^10.5.3",
"prettier": "2.2.1"
},

307
resources/css/app.css vendored
View file

@ -49,148 +49,151 @@ html {
}
/* Vue good-table */
.vgt-table.striped tbody tr:nth-of-type(odd) {
background-color: rgba(51, 68, 109, 0.03);
}
.vgt-right-align {
@apply text-left;
}
.vgt-left-align {
@apply text-left;
}
.vgt-center-align {
@apply text-center;
}
.vgt-pull-left {
@apply float-left !important;
}
.vgt-pull-right {
@apply float-right !important;
}
.vgt-clearfix::after {
@apply block;
content: '';
clear: both;
}
.vgt-responsive {
@apply w-full overflow-x-auto relative;
}
.vgt-text-disabled {
@apply text-grey-300;
}
.vgt-wrap {
@apply shadow relative;
}
.sr-only {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
.vgt-fixed-header {
@apply absolute z-10 w-full overflow-x-auto;
}
table.vgt-table {
@apply text-base border-collapse bg-white w-full max-w-full table-auto;
}
table.vgt-table td {
@apply p-3 border-b border-grey-100;
}
table.vgt-table tbody tr {
@apply h-20;
}
table.vgt-table tr.clickable {
@apply cursor-pointer;
}
table.vgt-table tr.clickable:hover {
@apply bg-grey-50;
}
.vgt-table th {
@apply p-3 align-middle relative;
}
.vgt-table th.sorting {
@apply cursor-pointer;
.vgt-table th.sortable button {
@apply absolute appearance-none border-none top-0 left-0 w-full h-full;
background: 0 0;
}
.vgt-table th.sorting:after {
@apply hidden absolute h-0 w-0;
.vgt-table th.sortable button:focus {
outline: 0;
}
.vgt-table th.sortable button:after {
@apply absolute h-0 w-0;
content: '';
right: 6px;
top: 50%;
margin-top: -3px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid theme('colors.cyan.500');
margin-top: -7px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid theme('colors.grey.300');
}
.vgt-table th.sorting:hover:after {
@apply inline-block;
border-bottom-color: theme('colors.cyan.400');
.vgt-table th.sortable button:before {
@apply absolute h-0 w-0;
content: '';
right: 6px;
top: 50%;
margin-bottom: -7px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid theme('colors.grey.300');
}
.vgt-table th.line-numbers,
.vgt-table th.vgt-checkbox-col {
@apply py-0 pr-1 pl-3 break-words w-6 text-center bg-white border border-t-0 border-r-0 border-l-0 border-grey-100;
padding: 0 0.75em 0 0.75em;
color: #606266;
border-right: 1px solid #dcdfe6;
word-wrap: break-word;
width: 25px;
text-align: center;
background: linear-gradient(#f4f5f8, #f1f3f6);
}
.vgt-table th.vgt-checkbox-col input {
@apply appearance-none inline-block align-middle flex-shrink-0 h-4 w-4 bg-white rounded border border-grey-100 text-cyan-500;
color-adjust: exact;
background-origin: border-box;
user-select: none;
}
.vgt-table th.vgt-checkbox-col input:checked {
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
border-color: transparent;
background-color: currentColor;
background-size: 100% 100%;
background-position: center;
background-repeat: no-repeat;
}
.vgt-table th.filter-th {
@apply p-3;
}
.vgt-table th.vgt-row-header {
@apply border-t-2 border-b-2 border-grey-100 bg-white;
}
.vgt-table th.vgt-row-header .triangle {
width: 24px;
height: 24px;
border-radius: 15%;
position: relative;
margin: 0 8px;
}
.vgt-table th.vgt-row-header .triangle:after {
content: '';
position: absolute;
display: block;
left: 50%;
top: 50%;
margin-top: -6px;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid #606266;
margin-left: -3px;
transition: 0.3s ease transform;
}
.vgt-table th.vgt-row-header .triangle.expand:after {
transform: rotate(90deg);
}
.vgt-table thead th {
@apply text-grey-400 align-bottom pr-6 bg-white cursor-pointer;
border-bottom: 1px solid #dcdfe6;
}
.vgt-table thead th.vgt-checkbox-col {
@apply align-middle;
}
.vgt-table thead th.sorting-asc,
.vgt-table thead th.sorting-desc {
@apply text-grey-800;
}
.vgt-table thead th.sorting-asc:after,
.vgt-table thead th.sorting-desc:after {
@apply block;
content: '';
.vgt-table thead th.sorting-asc button:after {
border-bottom: 5px solid theme('colors.cyan.400');
}
.vgt-table thead th.sorting-desc:after {
border-top: 6px solid theme('colors.cyan.500');
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: none;
.vgt-table thead th.sorting-desc button:before {
border-top: 5px solid theme('colors.cyan.400');
}
.vgt-input,
.vgt-select {
@apply w-full leading-none block text-sm font-normal text-grey-400 bg-white border;
@ -201,88 +204,202 @@ table.vgt-table tr.clickable:hover {
background-image: none;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.vgt-input::placeholder,
.vgt-select::placeholder {
@apply text-grey-500 opacity-25;
}
.vgt-input:focus,
.vgt-select:focus {
@apply outline-none border-cyan-500;
}
.vgt-loading {
@apply absolute w-full z-10;
margin-top: 117px;
}
.vgt-loading__content {
background-color: #c0dfff;
color: theme('colors.cyan.400');
padding: 7px 30px;
border-radius: 3px;
}
.vgt-inner-wrap.is-loading {
opacity: 0.5;
pointer-events: none;
}
.vgt-table.bordered td,
.vgt-table.bordered th {
border: 1px solid #dcdfe6;
}
.vgt-table.bordered th.vgt-row-header {
border-bottom: 3px solid #dcdfe6;
}
.vgt-table.condensed td,
.vgt-table.condensed th.vgt-row-header {
padding: 0.4em 0.4em 0.4em 0.4em;
}
@media (max-width: 576px) {
.vgt-compact * {
box-sizing: border-box;
}
.vgt-compact tbody,
.vgt-compact td,
.vgt-compact tr {
display: block;
width: 100%;
}
.vgt-compact thead {
display: none;
}
.vgt-compact tr {
margin-bottom: 15px;
}
.vgt-compact td {
text-align: right;
position: relative;
}
.vgt-compact td:before {
content: attr(data-label);
position: relative;
float: left;
left: 0;
width: 40%;
padding-left: 10px;
font-weight: 700;
text-align: left;
}
.vgt-compact th.line-numbers {
width: 100% !important;
display: block;
padding: 0.3em 1em !important;
}
}
.vgt-global-search {
padding: 5px 0;
display: flex;
flex-wrap: nowrap;
align-items: stretch;
border: 1px solid #dcdfe6;
border-bottom: 0;
background: linear-gradient(#f4f5f8, #f1f3f6);
}
.vgt-global-search form {
display: flex;
}
.vgt-global-search form label {
margin-top: 3px;
}
.vgt-global-search__input {
position: relative;
padding-left: 40px;
flex-grow: 1;
}
.vgt-global-search__input .input__icon {
position: absolute;
left: 0;
max-width: 32px;
}
.vgt-global-search__input .input__icon .magnifying-glass {
margin-top: 3px;
margin-left: 8px;
display: block;
width: 16px;
height: 16px;
border: 2px solid #494949;
position: relative;
border-radius: 50%;
}
.vgt-global-search__input .input__icon .magnifying-glass:before {
content: '';
display: block;
position: absolute;
right: -7px;
bottom: -5px;
background: #494949;
width: 8px;
height: 4px;
border-radius: 2px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
}
.vgt-global-search__actions {
margin-left: 10px;
}
.vgt-selection-info-row {
@apply text-yellow-600 bg-yellow-50 p-3 text-sm font-bold;
background: #fdf9e8;
padding: 5px 16px;
font-size: 13px;
border-top: 1px solid #dcdfe6;
border-left: 1px solid #dcdfe6;
border-right: 1px solid #dcdfe6;
color: #d3aa3b;
font-weight: 700;
}
.vgt-selection-info-row a {
@apply font-bold inline-block ml-2;
font-weight: 700;
display: inline-block;
margin-left: 10px;
}
.vgt-wrap__actions-footer {
@apply border border-grey-100;
}
.vgt-wrap__footer {
@apply p-4 text-grey-400 bg-white;
}
.vgt-wrap__footer .footer__row-count__label,
.vgt-wrap__footer .footer__row-count__select {
@apply inline-block align-middle bg-white;
}
.vgt-wrap__footer .footer__row-count__label {
@apply text-sm text-grey-500;
}
.vgt-wrap__footer .footer__row-count__select {
@apply w-auto p-0 border-0 border-r-0 h-auto text-sm ml-2 text-grey-500 font-bold;
}
.vgt-wrap__footer .footer__row-count__select:focus {
@apply outline-none border-cyan-500;
}
.vgt-wrap__footer .footer__navigation {
@apply text-sm;
}
.vgt-wrap__footer .footer__navigation > button:first-of-type {
margin-right: 16px;
}
.vgt-wrap__footer .footer__navigation__info,
.vgt-wrap__footer .footer__navigation__page-btn,
.vgt-wrap__footer .footer__navigation__page-info {
@apply inline-block align-middle;
}
.vgt-wrap__footer .footer__navigation__page-btn {
@apply no-underline text-grey-500 font-bold whitespace-nowrap;
}
.vgt-wrap__footer .footer__navigation__page-btn:focus {
@apply outline-none border-0;
}
.vgt-wrap__footer .footer__navigation__page-btn:hover {
cursor: pointer;
}
.vgt-wrap__footer .footer__navigation__page-btn.disabled,
.vgt-wrap__footer .footer__navigation__page-btn.disabled:hover {
@apply opacity-50 cursor-not-allowed;
}
.vgt-wrap__footer .footer__navigation__page-btn.disabled .chevron.left:after,
.vgt-wrap__footer .footer__navigation__page-btn.disabled:hover .chevron.left:after {
border-right-color: #606266;
}
.vgt-wrap__footer .footer__navigation__page-btn.disabled .chevron.right:after,
.vgt-wrap__footer .footer__navigation__page-btn.disabled:hover .chevron.right:after {
border-left-color: #606266;
}
.vgt-wrap__footer .footer__navigation__page-btn span {
@apply inline-block align-middle text-sm;
}
.vgt-wrap__footer .footer__navigation__page-btn .chevron {
@apply h-6 w-6 relative my-0 mx-2;
@apply h-6 w-6 relative align-middle my-0 mx-2;
border-radius: 15%;
}
.vgt-wrap__footer .footer__navigation__page-btn .chevron:after {
@apply absolute block;
content: '';
@ -292,31 +409,29 @@ table.vgt-table tr.clickable:hover {
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
}
.vgt-wrap__footer .footer__navigation__page-btn .chevron.left::after {
border-right: 6px solid theme('colors.cyan.500');
border-right: 6px solid theme('colors.cyan.400');
margin-left: -3px;
}
.vgt-wrap__footer .footer__navigation__page-btn .chevron.right::after {
border-left: 6px solid theme('colors.cyan.500');
border-left: 6px solid theme('colors.cyan.400');
margin-left: -3px;
}
.vgt-wrap__footer .footer__navigation__info,
.vgt-wrap__footer .footer__navigation__page-info {
@apply inline-block text-grey-600 my-0 mx-4;
@apply text-grey-600 my-0 mx-4;
}
.vgt-wrap__footer .footer__navigation__page-info span {
display: inline-block;
vertical-align: middle;
}
.vgt-wrap__footer .footer__navigation__page-info__current-entry {
@apply text-center w-6 inline-block my-0 mx-2 font-bold border border-grey-200;
@apply text-center w-8 inline-block my-0 mx-1 font-bold border border-grey-200;
}
@media only screen and (max-width: 750px) {
.vgt-wrap__footer .footer__navigation__info {
@apply hidden;
}
.vgt-wrap__footer .footer__navigation__page-btn {
@apply ml-4;
}