Fix some linting

This commit is contained in:
James Cole committed 2026-09-30 20:32:08 +02:00
1 parent 4bb1ad60b4
commit 91d99365f4
4 files changed
+7 -17

No files matched your search

@@ -29,7 +29,6 @@ use FireflyIII\Rules\IsValidFilterInstruction;
use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Contracts\Validation\Validator;
use RuntimeException;
class FilterRequest extends ApiRequest
{
@@ -53,7 +52,7 @@ class FilterRequest extends ApiRequest
public function rules(): array
{
return [
'filter' => ['min:0', 'max:255', $this->required, new IsValidFilterInstruction((string) $this->filterClass)],
'filter' => ['min:0', 'max:255', $this->required, new IsValidFilterInstruction((string)$this->filterClass)],
];
}
@@ -18,13 +18,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
export function changedAmount(e, givenIndex) {
let index = 0;
if (null === e) {
index = parseInt(givenIndex);
}
export function changedAmount(e) {
if (null !== e) {
index = parseInt(e.target.dataset.index);
let index = parseInt(e.target.dataset.index);
let value = e.target.value;
// switch commas for dots.
let len = (value.match(/,/g) || []).length;
@@ -18,13 +18,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
export function changedForeignAmount(e, givenIndex) {
let index = 0;
if (null === e) {
index = parseInt(givenIndex);
}
export function changedForeignAmount(e) {
if (null !== e) {
index = parseInt(e.target.dataset.index);
let index = parseInt(e.target.dataset.index);
let value = e.target.value;
// switch commas for dots.
let len = (value.match(/,/g) || []).length;
@@ -33,5 +29,4 @@ export function changedForeignAmount(e, givenIndex) {
}
this.entries[index].foreign_amount = parseFloat(value);
}
}
@@ -34,12 +34,12 @@ export function clearDescription(index) {
}
export function clearAmount(index) {
this.entries[index].amount = "";
this.changedAmount(null, index);
this.changedAmount(null);
}
export function clearForeignAmount(index) {
this.entries[index].foreign_amount = "";
this.changedForeignAmount(null, index);
// this.changedForeignAmount(null);
}
export function clearCategory(index) {