Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/Http/Controllers/Project/Planning/CriteriaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function store(Request $request, string $projectId): RedirectResponse
return redirect()
->back()
->with('activePlanningTab', 'criteria')
->with('error', 'Project not found');
->with('error', __('project/planning.criteria.not_found'));
}

$project = Project::findOrFail($projectId);
Expand All @@ -38,7 +38,7 @@ public function store(Request $request, string $projectId): RedirectResponse
->back()
->with('activePlanningTab', 'criteria')
->withErrors([
'duplicate' => 'The provided ID already exists in this project.',
'duplicate' => __('project/planning.criteria.duplicate_id'),
]);
}

Expand Down Expand Up @@ -84,7 +84,7 @@ public function update(Request $request, string $projectId, Criteria $criterion)

if ($existingCriteria) {
return back()->withErrors([
'duplicate' => 'The provided ID already exists in this project.',
'duplicate' => __('project/planning.criteria.duplicate_id'),
]);
}

Expand All @@ -99,7 +99,7 @@ public function update(Request $request, string $projectId, Criteria $criterion)
return redirect()
->back()
->with('activePlanningTab', 'criteria')
->with('success', 'Criteria updated successfully');
->with('success', __('project/planning.criteria.updated_success'));
}

/**
Expand All @@ -115,7 +115,7 @@ public function destroy(string $projectId, Criteria $criterion): RedirectRespons
if ($criterion->id_project != $projectId) {
return redirect()
->back()
->with('error', 'Criteria not found');
->with('error', __('project/planning.criteria.not_found'));
}


Expand All @@ -134,8 +134,8 @@ public function destroy(string $projectId, Criteria $criterion): RedirectRespons
return redirect()
->back()
->with('activePlanningTab', 'criteria')
->with('success', 'Criteria deleted successfully')
->with('progress', $progress);
->with('success', __('project.planning.criteria.deleted_success'));

}

/**
Expand Down Expand Up @@ -166,7 +166,7 @@ public function change_preselected(Request $request, string $id): RedirectRespon
return redirect()
->back()
->with('activePlanningTab', 'criteria')
->with('success', 'Pre-selected value updated successfully');
->with('success', __('project/planning.criteria.preselected_updated'));
}

/**
Expand Down
8 changes: 4 additions & 4 deletions app/Livewire/Conducting/QualityAssessment/PaperModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ public function updateStatusManual()
$paper->save();

session()->forget('successMessage');
session()->flash('successMessage', "Status Quality updated successfully. New status: " . $status->status);
session()->flash('successMessage', __("project/conducting.quality-assessment.messages.status_quality_updated", ['status' => $status->status]));
} else {
session()->forget('successMessage');
session()->flash('successMessage', "Status updated for your selection. New status: " . $status->status);
session()->flash('successMessage', __("project/conducting.quality-assessment.messages.status_updated_for_selection", ['status' => $status->status]));
}
session()->forget('successMessage');
session()->flash('successMessage', "Status Quality updated successfully. New status: " . $status->status);
session()->flash('successMessage', __("project/conducting.quality-assessment.messages.status_quality_updated", ['status' => $status->status]));
// Mostra o modal de sucesso
$this->dispatch('show-success-quality');
}
Expand Down Expand Up @@ -218,7 +218,7 @@ public function updateScore($questionId, $scoreId)
$this->loadSelectedScores();

session()->forget('successMessage');
session()->flash('successMessage', "Evaluation Quality Score updated successfully.");
session()->flash('successMessage', __("project/conducting.quality-assessment.messages.evaluation_quality_score_updated"));

// Se desejar, você pode adicionar uma mensagem de sucesso ou atualizar algum estado
$this->dispatch('reload-paper-modal');
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/Conducting/StudySelection/PaperModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function changePreSelected($criteriaId, $type)

$this->updatePaperStatus($type);
session()->forget('successMessage');
session()->flash('successMessage', "Criteria updated successfully. New status: " . $this->getPaperStatusDescription($this->paper['status_selection']));
session()->flash('successMessage', __("project/conducting.study-selection.messages.criteria_updated", ['status' => $this->getPaperStatusDescription($this->paper['status_selection'])]));

// Atualiza a view para mostrar o alert
$this->dispatch('show-success');
Expand Down
9 changes: 8 additions & 1 deletion lang/en/project/conducting.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@
'success' => 'Success',

],

'messages' => [
'criteria_updated' => 'Criteria updated successfully. New status: :status',
],
'status' => [
'duplicate' => 'Duplicate',
'removed' => 'Removed',
Expand Down Expand Up @@ -279,6 +281,11 @@
'error' => 'Error',
'success' => 'Success',
],
'messages' => [
'evaluation_quality_score_updated' => 'Evaluation Quality Score updated successfully.',
'status_quality_updated' => 'Status Quality updated successfully. New status: :status',
'status_updated_for_selection' => 'Status updated for your selection. New status: :status',
],
'status' => [
'duplicate' => 'Duplicate',
'removed' => 'Removed',
Expand Down
5 changes: 5 additions & 0 deletions lang/en/project/planning.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@
],
],
],
'duplicate_id' => 'The provided ID already exists in this project.',
'updated_success' => 'Criteria updated successfully.',
'not_found' => 'Criteria not found.',
'deleted_success' => 'Criteria deleted successfully.',
'preselected_updated' => 'Pre-selected value updated successfully.',
],
'quality-assessment' => [
'title' => 'Quality Assessment',
Expand Down
9 changes: 8 additions & 1 deletion lang/pt_BR/project/conducting.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
'table-duplicate-no' => 'NÃO',

],
'messages' => [
'criteria_updated' => 'Critério atualizado com sucesso. Novo status: :status',
],
'toasts' => [
'denied' => 'Um visualizador não pode editar a seleção de estudos',
]
Expand Down Expand Up @@ -471,7 +474,11 @@
'data-refresh' => 'Dados atualizados com sucesso',
],
],

'messages' => [
'evaluation_quality_score_updated' => 'Pontuação de Avaliação de Qualidade atualizada com sucesso.',
'status_quality_updated' => 'Status de Qualidade atualizado com sucesso. Novo status: :status',
'status_updated_for_selection' => 'Status atualizado para sua seleção. Novo status: :status',
],
],

'data-extraction' => [
Expand Down
5 changes: 5 additions & 0 deletions lang/pt_BR/project/planning.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@
'denied' => 'Um visualizador não pode adicionar, editar ou excluir critérios de inclusão/exclusão.',
],
],
'duplicate_id' => 'O ID fornecido já existe neste projeto.',
'updated_success' => 'Critério atualizado com sucesso.',
'not_found' => 'Critério não encontrado.',
'deleted_success' => 'Critério excluído com sucesso.',
'preselected_updated' => 'Valor pré-selecionado atualizado com sucesso.',
],
'quality-assessment' => [
'title' => 'Avaliação de Qualidade',
Expand Down
Loading