VHS-Karten integriert, Bildzoom ergänzt und Chat-IDs korrigiert
Unterschriftenerfassung dauerhaft auf Deutsch anzeigen, lokale VHS-Buildkonfiguration und Regressionstests ergänzen sowie Version auf 357.0.0+357 anheben.
This commit is contained in:
1 parent
c0b667c4ee
commit
5e7babf265
26 files changed
+752
-93
No files matched your search
@@ -165,6 +165,14 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
// Aufbau der Seite
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
String _taskText(TaskInfo taskInfo, String key) {
|
||||
// Die Unterschriftenerfassung bleibt unabhängig von der App-Sprache deutsch.
|
||||
return AppLocalizations.tr(
|
||||
key,
|
||||
language: taskInfo.task?.effectiveType == 2 ? AppLanguage.german : null,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!_initCompleted) {
|
||||
@@ -190,13 +198,13 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6),
|
||||
child: Text(
|
||||
'${'commission_number_short'.tr}: $_commisionNumber',
|
||||
'${_taskText(taskInfo, 'commission_number_short')}: $_commisionNumber',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${'task'.tr} ${_index + 1} / ${_taskList.length}',
|
||||
'${_taskText(taskInfo, 'task')} ${_index + 1} / ${_taskList.length}',
|
||||
style: const TextStyle(fontSize: 13, color: Colors.grey),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
@@ -238,7 +246,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
children: [
|
||||
Expanded(
|
||||
child: _navButton(
|
||||
'back'.tr,
|
||||
_taskText(taskInfo, 'back'),
|
||||
_index > 0 ? () => setState(() => _index--) : null,
|
||||
primary: false,
|
||||
),
|
||||
@@ -247,9 +255,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
Expanded(
|
||||
child: isLast
|
||||
? (widget.readOnly
|
||||
? _navButton('close'.tr, () => _popBack())
|
||||
: _navButton('finish'.tr, canProceed ? () => _onFinish() : null))
|
||||
: _navButton('next'.tr, canProceed ? () => _onNext() : null),
|
||||
? _navButton(_taskText(taskInfo, 'close'), () => _popBack())
|
||||
: _navButton(_taskText(taskInfo, 'finish'), canProceed ? () => _onFinish() : null))
|
||||
: _navButton(_taskText(taskInfo, 'next'), canProceed ? () => _onNext() : null),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -285,7 +293,11 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Widget _buildReadOnlyBody(TaskInfo taskInfo) {
|
||||
final summary = (taskInfo.additionalText ?? '').trim();
|
||||
var summary = (taskInfo.additionalText ?? '').trim();
|
||||
if (taskInfo.task?.effectiveType == 2 && summary.isNotEmpty) {
|
||||
// Auch früher in einer anderen Sprache gespeicherte Bestätigungen anzeigen.
|
||||
summary = _taskText(taskInfo, 'signature_captured');
|
||||
}
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(14),
|
||||
@@ -297,7 +309,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('completed'.tr, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
Text(_taskText(taskInfo, 'completed'), style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
if (summary.isNotEmpty) ...[
|
||||
const SizedBox(height: 6),
|
||||
Text(summary, style: const TextStyle(fontSize: 15)),
|
||||
@@ -548,7 +560,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton.icon(
|
||||
icon: const Icon(Icons.clear),
|
||||
label: Text('clear'.tr),
|
||||
label: Text(_taskText(taskInfo, 'clear')),
|
||||
onPressed: () => setState(() => draft.signatureController!.clear()),
|
||||
),
|
||||
),
|
||||
@@ -818,7 +830,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
final answer = await _createAnswerHeader(taskInfo);
|
||||
answer.sign = _convertSignaturePoints(draft.signatureController!.points);
|
||||
taskInfo.answer = jsonEncode(answer.toJson());
|
||||
taskInfo.additionalText = 'signature_captured'.tr;
|
||||
taskInfo.additionalText = _taskText(taskInfo, 'signature_captured');
|
||||
taskInfo.completed = true;
|
||||
_persist(taskInfo);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user