Skip to content

Commit

Permalink
Fix Folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Puvikaran2001 committed May 10, 2024
1 parent ec71a74 commit 70e7873
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@ import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import dk.scheduling.schedulingfrontend.pages.AccountPage
import dk.scheduling.schedulingfrontend.pages.CreateDevicePage
import dk.scheduling.schedulingfrontend.pages.CreateTaskPage
import dk.scheduling.schedulingfrontend.pages.HomePage
import dk.scheduling.schedulingfrontend.pages.LoginPage
import dk.scheduling.schedulingfrontend.pages.Page
import dk.scheduling.schedulingfrontend.pages.SignUpPage
import dk.scheduling.schedulingfrontend.pages.TaskOverviewPage
import dk.scheduling.schedulingfrontend.ui.theme.SchedulingFrontendTheme
import dk.scheduling.schedulingfrontend.datasources.AccountDataSource
import dk.scheduling.schedulingfrontend.datasources.api.getApiClient
import dk.scheduling.schedulingfrontend.gui.pages.AccountPage
import dk.scheduling.schedulingfrontend.gui.pages.CreateDevicePage
import dk.scheduling.schedulingfrontend.gui.pages.CreateTaskPage
import dk.scheduling.schedulingfrontend.gui.pages.HomePage
import dk.scheduling.schedulingfrontend.gui.pages.LoginPage
import dk.scheduling.schedulingfrontend.gui.pages.Page
import dk.scheduling.schedulingfrontend.gui.pages.SignUpPage
import dk.scheduling.schedulingfrontend.gui.pages.TaskOverviewPage
import dk.scheduling.schedulingfrontend.gui.theme.SchedulingFrontendTheme
import dk.scheduling.schedulingfrontend.repositories.account.AccountRepository
import dk.scheduling.schedulingfrontend.repositories.device.DeviceRepository
import dk.scheduling.schedulingfrontend.repositories.event.EventRepository
import dk.scheduling.schedulingfrontend.repositories.overviews.OverviewRepository
import dk.scheduling.schedulingfrontend.repositories.task.TaskRepository
import kotlinx.coroutines.runBlocking

class MainActivity : ComponentActivity() {
Expand Down Expand Up @@ -96,7 +103,11 @@ class MainActivity : ComponentActivity() {
CreateDevicePage(
deviceRepository = App.appModule.deviceRepo,
navigateOnValidCreation = { appState.navHostController.navigate(Page.DeviceOverview.route) },
navigateOnCancelCreation = { appState.navHostController.navigate(Page.DeviceOverview.route) },
navigateOnCancelCreation = {
appState.navHostController.navigate(
Page.DeviceOverview.route,
)
},
)
}
composable(
Expand All @@ -107,7 +118,11 @@ class MainActivity : ComponentActivity() {
deviceRepository = App.appModule.deviceRepo,
taskRepository = App.appModule.taskRepo,
navigateOnValidCreation = { appState.navHostController.navigate(Page.TaskOverview.route) },
navigateOnCancelCreation = { appState.navHostController.navigate(Page.TaskOverview.route) },
navigateOnCancelCreation = {
appState.navHostController.navigate(
Page.TaskOverview.route,
)
},
)
}
composable(Page.Account.route) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import androidx.navigation.NavController
import androidx.navigation.NavDestination.Companion.hierarchy
import androidx.navigation.NavGraph.Companion.findStartDestination
import androidx.navigation.compose.currentBackStackEntryAsState
import dk.scheduling.schedulingfrontend.pages.Page
import dk.scheduling.schedulingfrontend.gui.pages.Page

@Composable
fun BottomNavigationBar(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dk.scheduling.schedulingfrontend.model

import dk.scheduling.schedulingfrontend.api.protocol.Event
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Event
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dk.scheduling.schedulingfrontend.model

import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.TimePickerState
import dk.scheduling.schedulingfrontend.components.DateRange
import dk.scheduling.schedulingfrontend.gui.components.DateRange
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dk.scheduling.schedulingfrontend.repositories.device

import dk.scheduling.schedulingfrontend.api.ApiService
import dk.scheduling.schedulingfrontend.api.protocol.CreateDeviceRequest
import dk.scheduling.schedulingfrontend.api.protocol.Device
import dk.scheduling.schedulingfrontend.datasources.api.ApiService
import dk.scheduling.schedulingfrontend.datasources.api.protocol.CreateDeviceRequest
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Device
import dk.scheduling.schedulingfrontend.exceptions.CreationFailedException
import dk.scheduling.schedulingfrontend.exceptions.DeletionFailedException
import dk.scheduling.schedulingfrontend.exceptions.NoBodyWasProvidedException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package dk.scheduling.schedulingfrontend.repositories.event

import android.content.Context
import androidx.work.WorkManager
import dk.scheduling.schedulingfrontend.api.ApiService
import dk.scheduling.schedulingfrontend.api.protocol.Event
import dk.scheduling.schedulingfrontend.background.EventAlarmSetterWorker
import dk.scheduling.schedulingfrontend.datasources.api.ApiService
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Event
import dk.scheduling.schedulingfrontend.exceptions.NoBodyWasProvidedException
import dk.scheduling.schedulingfrontend.exceptions.UnauthorizedException
import dk.scheduling.schedulingfrontend.exceptions.UnsuccessfulRequestException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dk.scheduling.schedulingfrontend.repositories.task

import dk.scheduling.schedulingfrontend.api.protocol.Task
import dk.scheduling.schedulingfrontend.api.protocol.Timespan
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Task
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Timespan

interface ITaskRepository {
suspend fun getAllTasks(): List<Task>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package dk.scheduling.schedulingfrontend.repositories.task

import dk.scheduling.schedulingfrontend.api.ApiService
import dk.scheduling.schedulingfrontend.api.protocol.CreateTaskRequest
import dk.scheduling.schedulingfrontend.api.protocol.Task
import dk.scheduling.schedulingfrontend.api.protocol.Timespan
import dk.scheduling.schedulingfrontend.datasources.api.ApiService
import dk.scheduling.schedulingfrontend.datasources.api.protocol.CreateTaskRequest
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Task
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Timespan
import dk.scheduling.schedulingfrontend.exceptions.CreationFailedException
import dk.scheduling.schedulingfrontend.exceptions.DeletionFailedException
import dk.scheduling.schedulingfrontend.exceptions.NoBodyWasProvidedException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package testdata

import dk.scheduling.schedulingfrontend.api.protocol.Device
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Device
import dk.scheduling.schedulingfrontend.repositories.device.IDeviceRepository
import kotlinx.coroutines.delay

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package dk.scheduling.schedulingfrontend

import dk.scheduling.schedulingfrontend.api.ApiService
import dk.scheduling.schedulingfrontend.api.getApiClient
import dk.scheduling.schedulingfrontend.api.protocol.CreateDeviceRequest
import dk.scheduling.schedulingfrontend.api.protocol.CreateTaskRequest
import dk.scheduling.schedulingfrontend.api.protocol.Device
import dk.scheduling.schedulingfrontend.api.protocol.RegisterOrLoginRequest
import dk.scheduling.schedulingfrontend.api.protocol.Task
import dk.scheduling.schedulingfrontend.api.protocol.Timespan
import dk.scheduling.schedulingfrontend.datasources.api.ApiService
import dk.scheduling.schedulingfrontend.datasources.api.getApiClient
import dk.scheduling.schedulingfrontend.datasources.api.protocol.CreateDeviceRequest
import dk.scheduling.schedulingfrontend.datasources.api.protocol.CreateTaskRequest
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Device
import dk.scheduling.schedulingfrontend.datasources.api.protocol.RegisterOrLoginRequest
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Task
import dk.scheduling.schedulingfrontend.datasources.api.protocol.Timespan
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dk.scheduling.schedulingfrontend

import dk.scheduling.schedulingfrontend.components.DateRange
import dk.scheduling.schedulingfrontend.gui.components.DateRange
import org.junit.Test

class DateRangeTest {
Expand Down

0 comments on commit 70e7873

Please sign in to comment.