feat: penyesuaian pada beberapa logic component
This commit is contained in:
parent
17cee7b7d7
commit
576f5b27ea
|
@ -38,8 +38,8 @@
|
||||||
"library_title": "Quiz Library",
|
"library_title": "Quiz Library",
|
||||||
"library_description": "A collection of quiz questions created for study.",
|
"library_description": "A collection of quiz questions created for study.",
|
||||||
"no_quiz_available": "No quizzes available yet.",
|
"no_quiz_available": "No quizzes available yet.",
|
||||||
"quiz_count_label": "Quizzes",
|
"quiz_count_label": "Quiz",
|
||||||
"quiz_count_named": "{total} Quizzes",
|
"quiz_count_named": "{total} Quiz",
|
||||||
|
|
||||||
"history_title": "Quiz History",
|
"history_title": "Quiz History",
|
||||||
"history_subtitle": "Review the quizzes you've taken",
|
"history_subtitle": "Review the quizzes you've taken",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class APIEndpoint {
|
class APIEndpoint {
|
||||||
static const String baseUrl = "http://192.168.1.13:5000";
|
// 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://103.193.178.121:5000";
|
||||||
static const String api = "$baseUrl/api";
|
static const String api = "$baseUrl/api";
|
||||||
|
|
||||||
static const String login = "/login";
|
static const String login = "/login";
|
||||||
|
|
|
@ -56,7 +56,7 @@ class JoinRoomController extends GetxController {
|
||||||
final Map<String, dynamic> sessionInfoJson = dataPayload["session_info"];
|
final Map<String, dynamic> sessionInfoJson = dataPayload["session_info"];
|
||||||
final Map<String, dynamic> quizInfoJson = dataPayload["quiz_info"];
|
final Map<String, dynamic> quizInfoJson = dataPayload["quiz_info"];
|
||||||
|
|
||||||
// CustomFloatingLoading.showLoading(context);
|
CustomFloatingLoading.hideLoading();
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
AppRoutes.waitRoomPage,
|
AppRoutes.waitRoomPage,
|
||||||
arguments: WaitingRoomDTO(
|
arguments: WaitingRoomDTO(
|
||||||
|
|
|
@ -280,6 +280,8 @@ class QuizCreationController extends GetxController {
|
||||||
CustomFloatingLoading.hideLoading();
|
CustomFloatingLoading.hideLoading();
|
||||||
isGenerate.value = false;
|
isGenerate.value = false;
|
||||||
|
|
||||||
|
inputSentenceTC.text = "";
|
||||||
|
|
||||||
if (quizData.isNotEmpty && selectedQuizIndex.value == 0) {
|
if (quizData.isNotEmpty && selectedQuizIndex.value == 0) {
|
||||||
final data = quizData[0];
|
final data = quizData[0];
|
||||||
questionTC.text = data.question ?? "";
|
questionTC.text = data.question ?? "";
|
||||||
|
|
|
@ -96,6 +96,7 @@ class QuizPreviewController extends GetxController {
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
message: 'Jumlah soal harus 10 atau lebih',
|
message: 'Jumlah soal harus 10 atau lebih',
|
||||||
);
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,9 +125,11 @@ class QuizPreviewController extends GetxController {
|
||||||
message: 'Kuis berhasil disimpan!',
|
message: 'Kuis berhasil disimpan!',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CustomFloatingLoading.hideLoading();
|
||||||
Get.offAllNamed(AppRoutes.mainPage, arguments: 2);
|
Get.offAllNamed(AppRoutes.mainPage, arguments: 2);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
CustomFloatingLoading.hideLoading();
|
||||||
logC.e(e);
|
logC.e(e);
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
|
|
|
@ -106,6 +106,14 @@ class RoomMakerController extends GetxController {
|
||||||
return;
|
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()) {
|
if (!await _connectionService.isHaveConnection()) {
|
||||||
ConnectionNotification.noInternedConnection();
|
ConnectionNotification.noInternedConnection();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue