feat: penyesuaian pada beberapa logic component

This commit is contained in:
akhdanre 2025-06-07 14:35:48 +07:00
parent 17cee7b7d7
commit 576f5b27ea
6 changed files with 18 additions and 5 deletions

View File

@ -38,8 +38,8 @@
"library_title": "Quiz Library",
"library_description": "A collection of quiz questions created for study.",
"no_quiz_available": "No quizzes available yet.",
"quiz_count_label": "Quizzes",
"quiz_count_named": "{total} Quizzes",
"quiz_count_label": "Quiz",
"quiz_count_named": "{total} Quiz",
"history_title": "Quiz History",
"history_subtitle": "Review the quizzes you've taken",

View File

@ -1,6 +1,6 @@
class APIEndpoint {
static const String baseUrl = "http://192.168.1.13:5000";
// static const String baseUrl = "http://103.193.178.121:5000";
// static const String baseUrl = "http://192.168.1.13:5000";
static const String baseUrl = "http://103.193.178.121:5000";
static const String api = "$baseUrl/api";
static const String login = "/login";

View File

@ -56,7 +56,7 @@ class JoinRoomController extends GetxController {
final Map<String, dynamic> sessionInfoJson = dataPayload["session_info"];
final Map<String, dynamic> quizInfoJson = dataPayload["quiz_info"];
// CustomFloatingLoading.showLoading(context);
CustomFloatingLoading.hideLoading();
Get.toNamed(
AppRoutes.waitRoomPage,
arguments: WaitingRoomDTO(

View File

@ -280,6 +280,8 @@ class QuizCreationController extends GetxController {
CustomFloatingLoading.hideLoading();
isGenerate.value = false;
inputSentenceTC.text = "";
if (quizData.isNotEmpty && selectedQuizIndex.value == 0) {
final data = quizData[0];
questionTC.text = data.question ?? "";

View File

@ -96,6 +96,7 @@ class QuizPreviewController extends GetxController {
title: 'Error',
message: 'Jumlah soal harus 10 atau lebih',
);
return;
}
@ -124,9 +125,11 @@ class QuizPreviewController extends GetxController {
message: 'Kuis berhasil disimpan!',
);
CustomFloatingLoading.hideLoading();
Get.offAllNamed(AppRoutes.mainPage, arguments: 2);
}
} catch (e) {
CustomFloatingLoading.hideLoading();
logC.e(e);
} finally {
isLoading.value = false;

View File

@ -106,6 +106,14 @@ class RoomMakerController extends GetxController {
return;
}
if (int.tryParse(maxPlayerTC.text) == null) {
CustomNotification.error(
title: "Input tidak valid",
message: "Jumlah pemain harus berupa angka tanpa karakter huruf atau simbol.",
);
return;
}
if (!await _connectionService.isHaveConnection()) {
ConnectionNotification.noInternedConnection();
return;