Clean up error display.

This commit is contained in:
James Cole 2021-04-03 20:46:37 +02:00
parent f81a7cfac0
commit 4035ac09ce
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
5 changed files with 59 additions and 6 deletions

View File

@ -483,11 +483,29 @@ export default {
for (let ii in basicFields) {
if (basicFields.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {
let fieldName = basicFields[ii];
let submissionFieldName = fieldName;
if (currentTransaction[fieldName] !== originalTransaction[fieldName]) {
// console.log('Index ' + i + ': Field ' + fieldName + ' updated ("' + originalTransaction[fieldName] + '" > "' + currentTransaction[fieldName] + '")');
// console.log(originalTransaction[fieldName]);
// console.log(currentTransaction[fieldName]);
diff[fieldName] = currentTransaction[fieldName];
// some field names may need to be different. little basic but it works:
// console.log('pre: ' + submissionFieldName);
if ('source_account_id' === submissionFieldName) {
submissionFieldName = 'source_id';
}
if ('source_account_name' === submissionFieldName) {
submissionFieldName = 'source_name';
}
if ('destination_account_id' === submissionFieldName) {
submissionFieldName = 'destination_id';
}
if ('destination_account_name' === submissionFieldName) {
submissionFieldName = 'destination_name';
}
// console.log('post: ' + submissionFieldName);
diff[submissionFieldName] = currentTransaction[fieldName];
shouldSubmit = true;
}
}
@ -507,10 +525,10 @@ export default {
if (currentTransaction.tags.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {
// array.tags
let currentTag = currentTransaction.tags[ii];
if(typeof currentTag === 'object' && null !== currentTag) {
if (typeof currentTag === 'object' && null !== currentTag) {
diff.tags.push(currentTag.text);
}
if(typeof currentTag === 'string') {
if (typeof currentTag === 'string') {
diff.tags.push(currentTag);
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<base href="{{ route('index') }}/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Firefly III | Maintenance Mode</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="v2/plugins/local-fonts/gf-source.css">
<link rel="stylesheet" href="v2/css/app.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="error-page">
<h2 class="headline text-info">503</h2>
<div class="error-content">
<h3><i class="fas fa-robot text-info"></i> {{ trans('errors.maintenance_mode') }}</h3>
<p>
{{ trans('errors.check_back') }}
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -4,7 +4,7 @@
<base href="{{ route('index') }}/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 3 | 500 Error</title>
<title>Firefly III | 500 Error</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">