diff --git a/apps/skolplattformen-app-new/.gitignore b/apps/skolplattformen-app-new/.gitignore
deleted file mode 100644
index fba6c953..00000000
--- a/apps/skolplattformen-app-new/.gitignore
+++ /dev/null
@@ -1,71 +0,0 @@
-# OSX
-#
-.DS_Store
-
-# Xcode
-#
-build/
-*.pbxuser
-!default.pbxuser
-*.mode1v3
-!default.mode1v3
-*.mode2v3
-!default.mode2v3
-*.perspectivev3
-!default.perspectivev3
-xcuserdata
-*.xccheckout
-*.moved-aside
-DerivedData
-*.hmap
-*.ipa
-*.xcuserstate
-ios/.xcode.env.local
-
-# Android/IntelliJ
-#
-build/
-.idea
-.gradle
-local.properties
-*.iml
-*.hprof
-.cxx/
-!debug.keystore
-release/
-
-# node.js
-#
-node_modules/
-npm-debug.log
-yarn-error.log
-
-# fastlane
-#
-# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
-# screenshots whenever they are needed.
-# For more information about the recommended setup visit:
-# https://docs.fastlane.tools/best-practices/source-control/
-
-**/fastlane/report.xml
-**/fastlane/Preview.html
-**/fastlane/screenshots
-**/fastlane/test_output
-
-# Bundle artifact
-*.jsbundle
-
-# Ruby / CocoaPods
-/ios/Pods/
-/vendor/bundle/
-
-# Temporary files created by Metro to check the health of the file watcher
-.metro-health-check*
-
-# testing
-/coverage
-
-
-libraries.json
-
-keys.json
\ No newline at end of file
diff --git a/apps/skolplattformen-app-new/.prettierrc b/apps/skolplattformen-app-new/.prettierrc
deleted file mode 100644
index 623163be..00000000
--- a/apps/skolplattformen-app-new/.prettierrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "printWidth": 80,
- "tabWidth": 2,
- "useTabs": false,
- "semi": false,
- "singleQuote": true,
- "trailingComma": "es5",
- "bracketSpacing": true,
- "bracketSameLine": false
-}
diff --git a/apps/skolplattformen-app-new/.watchmanconfig b/apps/skolplattformen-app-new/.watchmanconfig
deleted file mode 100644
index 0967ef42..00000000
--- a/apps/skolplattformen-app-new/.watchmanconfig
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/apps/skolplattformen-app-new/App.tsx b/apps/skolplattformen-app-new/App.tsx
deleted file mode 100644
index 80500a95..00000000
--- a/apps/skolplattformen-app-new/App.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-import * as eva from '@eva-design/eva'
-import AsyncStorage from '@react-native-async-storage/async-storage'
-import { ApiProvider, Reporter } from './libs/hooks/src'
-import { ApplicationProvider, IconRegistry, Text } from '@ui-kitten/components'
-import { EvaIconsPack } from '@ui-kitten/eva-icons'
-import React from 'react'
-import { StatusBar, useColorScheme, View } from 'react-native'
-import { SafeAreaProvider } from 'react-native-safe-area-context'
-import { AppNavigator } from './components/navigation.component'
-import { FeatureProvider } from './context/feature/featureContext'
-import { LanguageProvider } from './context/language/languageContext'
-import { SchoolPlatformProvider } from './context/schoolPlatform/schoolPlatformContext'
-import { schoolPlatforms } from './data/schoolPlatforms'
-import { default as customMapping } from './design/mapping.json'
-import { darkTheme, lightTheme } from './design/themes'
-import useSettingsStorage from './hooks/useSettingsStorage'
-import { translations } from './utils/translation'
-import { GestureHandlerRootView } from 'react-native-gesture-handler'
-
-const reporter: Reporter | undefined = __DEV__
- ? {
- log: (message: string) => console.log(message),
- error: (error: Error, label?: string) => console.log(label, error),
- }
- : undefined
-
-if (__DEV__) {
- const DevMenu = require('react-native-dev-menu')
- DevMenu.addItem('Clear AsyncStorage from all contents', () =>
- AsyncStorage.clear().then(() => logAsyncStorage())
- )
- DevMenu.addItem('Log AsyncStorage contents', () => logAsyncStorage())
-}
-
-const safeJsonParse = (maybeJson: string) => {
- if (maybeJson) {
- try {
- return JSON.parse(maybeJson)
- } catch (error) {
- return maybeJson
- }
- }
- return 'null'
-}
-
-const logAsyncStorage = async () => {
- const allKeys = await AsyncStorage.getAllKeys()
- const keysAndValues = await AsyncStorage.multiGet(allKeys)
- console.log('*** AsyncStorage contents:')
- keysAndValues.forEach((keyAndValue) => {
- console.log(
- keyAndValue[0],
- '=>',
- keyAndValue[1] ? safeJsonParse(keyAndValue[1]) : 'null'
- )
- })
- console.log('***')
-}
-
-export default () => {
- const [usingSystemTheme] = useSettingsStorage('usingSystemTheme')
- const [currentSchoolPlatform] = useSettingsStorage('currentSchoolPlatform')
- const [theme] = useSettingsStorage('theme')
- const systemTheme = useColorScheme()
- const colorScheme = usingSystemTheme ? systemTheme : theme
-
- const platform = schoolPlatforms.find((pf) => pf.id === currentSchoolPlatform)
-
- if (!platform) {
- return (
-
- ERROR
-
- )
- }
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
diff --git a/apps/skolplattformen-app-new/README.md b/apps/skolplattformen-app-new/README.md
deleted file mode 100644
index f22bc1fc..00000000
--- a/apps/skolplattformen-app-new/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
-
-# Getting Started
-
->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
-
-## Getting started with Development
-
-### Please use node version 16 or higher
-
-To clone and build the project, you first need to install [git](https://git-scm.com/), [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/cli/v8/commands/npm-install).
-
-Clone the repo with
-```bash
-$ git clone https://github.com/Home-Biz-LLS/skolplattformen-react-native
-```
-
-Install dependencies
-```bash
-cd apps/skolplattformen-app-new/ && npm i
-```
-
-### iOS
-
-If you wanna run the iOS app, you need to setup a couple of things first, we have a guide that will assist you in getting started with the iOS app. A Mac is required to build projects with native code for iOS so we do not have support for Linux / Windows.
-
-* [Mac OS](https://reactnative.dev/docs/environment-setup)
-
-#### Step 1
-Make sure you have **Xcode** installed
-
-
-#### Step 2
-Make sure **CocoaPods** is installed (you can do it easily with homebrew)
-
-* [CocoaPods homebrew](https://formulae.brew.sh/formula/cocoapods)
-* [CocoaPods](https://guides.cocoapods.org/using/getting-started.html)
-
-
-#### Step 3
-```bash
-cd apps/skolplattformen-app-new/ios && pod install
-```
-
-If you already setup everything, go into the
-
-"skolplattformen-app-new" directory
-
-Start the metro
-
-```
-npm run start
-```
-
-then
-
-```
-i
-```
-to Start iOS app
-
-OR
-
-Start the iOS app directly
-```
-npm run ios
-```
-
-
-
-### Android
-
-If you wanna run the Android app, you need to setup a couple of things first, we have created three different guides depending on your operating system.
-
-* [Mac OS](/docs/android_mac.md)
-* [Windows](/docs/android_windows.md)
-* [Linux](/docs/android_linux.md)
-
-If you already setup everything, you just need to run the following command in the project root:
-
-```
-yarn run android
-```
-
diff --git a/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js b/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js
deleted file mode 100644
index d78ea925..00000000
--- a/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export {
- default,
- useAsyncStorage,
-} from '@react-native-async-storage/async-storage/jest/async-storage-mock'
diff --git a/apps/skolplattformen-app-new/__mocks__/react-native-localize.js b/apps/skolplattformen-app-new/__mocks__/react-native-localize.js
deleted file mode 100644
index aa153569..00000000
--- a/apps/skolplattformen-app-new/__mocks__/react-native-localize.js
+++ /dev/null
@@ -1,40 +0,0 @@
-const getLocales = () => [
- { countryCode: 'EN', languageTag: 'en-US', languageCode: 'en', isRTL: false },
- { countryCode: 'SE', languageTag: 'sv-SE', languageCode: 'sv', isRTL: false },
-]
-
-const findBestAvailableLanguage = jest.fn(() => ({
- languageTag: 'sv',
- isRTL: false,
-}))
-
-const getNumberFormatSettings = () => ({
- decimalSeparator: '.',
- groupingSeparator: ',',
-})
-
-const getCalendar = () => 'gregorian'
-const getCountry = () => 'SE'
-const getCurrencies = () => ['USD', 'SEK']
-const getTemperatureUnit = () => 'celsius'
-const getTimeZone = () => 'Europe/Stockholm'
-const uses24HourClock = () => true
-const usesMetricSystem = () => true
-
-const addEventListener = jest.fn()
-const removeEventListener = jest.fn()
-
-export {
- findBestAvailableLanguage,
- getLocales,
- getNumberFormatSettings,
- getCalendar,
- getCountry,
- getCurrencies,
- getTemperatureUnit,
- getTimeZone,
- uses24HourClock,
- usesMetricSystem,
- addEventListener,
- removeEventListener,
-}
diff --git a/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js b/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js
deleted file mode 100644
index d75b1ff6..00000000
--- a/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// __mocks__/react-native-safe-area-context.js
-import React from 'react'
-import { View } from 'react-native'
-
-const inset = {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
-}
-
-export const SafeAreaProvider = ({ children }) => children
-
-export const SafeAreaConsumer = ({ children }) => children(inset)
-
-export const SafeAreaView = ({ children }) => (
- {children}
-)
-
-export const useSafeAreaInsets = () => inset
diff --git a/apps/skolplattformen-app-new/android/app/build.gradle b/apps/skolplattformen-app-new/android/app/build.gradle
deleted file mode 100644
index 9ea1a1fc..00000000
--- a/apps/skolplattformen-app-new/android/app/build.gradle
+++ /dev/null
@@ -1,129 +0,0 @@
-apply plugin: "com.android.application"
-apply plugin: "com.facebook.react"
-
-/**
- * This is the configuration block to customize your React Native Android app.
- * By default you don't need to apply any configuration, just uncomment the lines you need.
- */
-react {
- /* Folders */
- // The root of your project, i.e. where "package.json" lives. Default is '..'
- // root = file("../")
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
- // reactNativeDir = file("../node_modules/react-native")
- // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
- // codegenDir = file("../node_modules/@react-native/codegen")
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
- // cliFile = file("../node_modules/react-native/cli.js")
-
- /* Variants */
- // The list of variants to that are debuggable. For those we're going to
- // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
- // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
- // debuggableVariants = ["liteDebug", "prodDebug"]
-
- /* Bundling */
- // A list containing the node command and its flags. Default is just 'node'.
- // nodeExecutableAndArgs = ["node"]
- //
- // The command to run when bundling. By default is 'bundle'
- // bundleCommand = "ram-bundle"
- //
- // The path to the CLI configuration file. Default is empty.
- // bundleConfig = file(../rn-cli.config.js)
- //
- // The name of the generated asset file containing your JS bundle
- // bundleAssetName = "MyApplication.android.bundle"
- //
- // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
- // entryFile = file("../js/MyApplication.android.js")
- //
- // A list of extra flags to pass to the 'bundle' commands.
- // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
- // extraPackagerArgs = []
-
- /* Hermes Commands */
- // The hermes compiler command to run. By default it is 'hermesc'
- // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
- //
- // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
- // hermesFlags = ["-O", "-output-source-map"]
-}
-
-/**
- * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
- */
-def enableProguardInReleaseBuilds = false
-
-/**
- * The preferred build flavor of JavaScriptCore (JSC)
- *
- * For example, to use the international variant, you can use:
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
- *
- * The international variant includes ICU i18n library and necessary data
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
- * give correct results when using with locales other than en-US. Note that
- * this variant is about 6MiB larger per architecture than default.
- */
-def jscFlavor = 'org.webkit:android-jsc:+'
-
-android {
- ndkVersion rootProject.ext.ndkVersion
-
- compileSdkVersion rootProject.ext.compileSdkVersion
-
- namespace "com.oppna_skolplattformen_new.app"
- defaultConfig {
- applicationId "com.oppna_skolplattformen_new.app"
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 4
- versionName "1.0"
- }
- signingConfigs {
- debug {
- storeFile file('debug.keystore')
- storePassword 'android'
- keyAlias 'androiddebugkey'
- keyPassword 'android'
- }
- release {
- storeFile file('release.jks')
- storePassword 'leeandseb'
- keyAlias 'upload'
- keyPassword 'leeandseb'
- }
- }
- buildTypes {
- debug {
- signingConfig signingConfigs.debug
- }
- release {
- // Caution! In production, you need to generate your own keystore file.
- // see https://reactnative.dev/docs/signed-apk-android.
- signingConfig signingConfigs.release
- minifyEnabled true
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
- }
- }
-}
-
-dependencies {
- // The version of react-native is set by the React Native Gradle Plugin
- implementation("com.facebook.react:react-android")
-
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
- exclude group:'com.squareup.okhttp3', module:'okhttp'
- }
-
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
- if (hermesEnabled.toBoolean()) {
- implementation("com.facebook.react:hermes-android")
- } else {
- implementation jscFlavor
- }
-}
-
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
diff --git a/apps/skolplattformen-app-new/android/app/debug.keystore b/apps/skolplattformen-app-new/android/app/debug.keystore
deleted file mode 100644
index 364e105e..00000000
Binary files a/apps/skolplattformen-app-new/android/app/debug.keystore and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/proguard-rules.pro b/apps/skolplattformen-app-new/android/app/proguard-rules.pro
deleted file mode 100644
index 11b02572..00000000
--- a/apps/skolplattformen-app-new/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
diff --git a/apps/skolplattformen-app-new/android/app/release.keystore b/apps/skolplattformen-app-new/android/app/release.keystore
deleted file mode 100644
index 3f0a4ced..00000000
Binary files a/apps/skolplattformen-app-new/android/app/release.keystore and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml b/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index 4b185bc1..00000000
--- a/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java b/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java
deleted file mode 100644
index 9d6fd920..00000000
--- a/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- *
This source code is licensed under the MIT license found in the LICENSE file in the root
- * directory of this source tree.
- */
-package com.oppna_skolplattformen_new.app;
-
-import android.content.Context;
-import com.facebook.flipper.android.AndroidFlipperClient;
-import com.facebook.flipper.android.utils.FlipperUtils;
-import com.facebook.flipper.core.FlipperClient;
-import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
-import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
-import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
-import com.facebook.flipper.plugins.inspector.DescriptorMapping;
-import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
-import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
-import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
-import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
-import com.facebook.react.ReactInstanceEventListener;
-import com.facebook.react.ReactInstanceManager;
-import com.facebook.react.bridge.ReactContext;
-import com.facebook.react.modules.network.NetworkingModule;
-import okhttp3.OkHttpClient;
-
-/**
- * Class responsible of loading Flipper inside your React Native application. This is the debug
- * flavor of it. Here you can add your own plugins and customize the Flipper setup.
- */
-public class ReactNativeFlipper {
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
- if (FlipperUtils.shouldEnableFlipper(context)) {
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
-
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
- client.addPlugin(new DatabasesFlipperPlugin(context));
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
- client.addPlugin(CrashReporterPlugin.getInstance());
-
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
- NetworkingModule.setCustomClientBuilder(
- new NetworkingModule.CustomClientBuilder() {
- @Override
- public void apply(OkHttpClient.Builder builder) {
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
- }
- });
- client.addPlugin(networkFlipperPlugin);
- client.start();
-
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
- // Hence we run if after all native modules have been initialized
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
- if (reactContext == null) {
- reactInstanceManager.addReactInstanceEventListener(
- new ReactInstanceEventListener() {
- @Override
- public void onReactContextInitialized(ReactContext reactContext) {
- reactInstanceManager.removeReactInstanceEventListener(this);
- reactContext.runOnNativeModulesQueueThread(
- new Runnable() {
- @Override
- public void run() {
- client.addPlugin(new FrescoFlipperPlugin());
- }
- });
- }
- });
- } else {
- client.addPlugin(new FrescoFlipperPlugin());
- }
- }
- }
-}
diff --git a/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml b/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 8af2453d..00000000
--- a/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 036d09bc..00000000
--- a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 86b42de1..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
deleted file mode 100644
index 3aeffa06..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 5ff72be1..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
deleted file mode 100644
index 03734664..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 833c039a..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
deleted file mode 100644
index b7e9942e..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index ac3d3c45..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index 514d5c45..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 262960fa..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index 0f9612b5..00000000
Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml
deleted file mode 100644
index c5d5899f..00000000
--- a/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- #FFFFFF
-
\ No newline at end of file
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml
deleted file mode 100644
index 6614fac3..00000000
--- a/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Öppna Skolplattformen NEW
-
diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index 955d1571..00000000
--- a/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java b/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java
deleted file mode 100644
index 7cdbff35..00000000
--- a/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- *
This source code is licensed under the MIT license found in the LICENSE file in the root
- * directory of this source tree.
- */
-package com.oppna_skolplattformen_new.app;
-
-import android.content.Context;
-import com.facebook.react.ReactInstanceManager;
-
-/**
- * Class responsible of loading Flipper inside your React Native application. This is the release
- * flavor of it so it's empty as we don't want to load Flipper.
- */
-public class ReactNativeFlipper {
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
- // Do nothing as we don't want to initialize Flipper on Release.
- }
-}
diff --git a/apps/skolplattformen-app-new/android/build.gradle b/apps/skolplattformen-app-new/android/build.gradle
deleted file mode 100644
index 34ea7181..00000000
--- a/apps/skolplattformen-app-new/android/build.gradle
+++ /dev/null
@@ -1,21 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext {
- buildToolsVersion = "33.0.0"
- minSdkVersion = 21
- compileSdkVersion = 33
- targetSdkVersion = 33
-
- // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
- ndkVersion = "23.1.7779620"
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath("com.android.tools.build:gradle")
- classpath("com.facebook.react:react-native-gradle-plugin")
- }
-}
diff --git a/apps/skolplattformen-app-new/android/gradle.properties b/apps/skolplattformen-app-new/android/gradle.properties
deleted file mode 100644
index a3b2fa12..00000000
--- a/apps/skolplattformen-app-new/android/gradle.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-# Project-wide Gradle settings.
-
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
-org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
-
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-
-# Version of flipper SDK to use with React Native
-FLIPPER_VERSION=0.182.0
-
-# Use this property to specify which architecture you want to build.
-# You can also override it from the CLI using
-# ./gradlew -PreactNativeArchitectures=x86_64
-reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
-
-# Use this property to enable support to the new architecture.
-# This will allow you to use TurboModules and the Fabric render in
-# your application. You should enable this flag either if you want
-# to write custom TurboModules/Fabric components OR use libraries that
-# are providing them.
-newArchEnabled=false
-
-# Use this property to enable or disable the Hermes JS engine.
-# If set to false, you will be using JSC instead.
-hermesEnabled=true
diff --git a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar b/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 943f0cbf..00000000
Binary files a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties b/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 6ec1567a..00000000
--- a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
-networkTimeout=10000
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/apps/skolplattformen-app-new/android/gradlew b/apps/skolplattformen-app-new/android/gradlew
deleted file mode 100755
index 65dcd68d..00000000
--- a/apps/skolplattformen-app-new/android/gradlew
+++ /dev/null
@@ -1,244 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-# This is normally unused
-# shellcheck disable=SC2034
-APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/apps/skolplattformen-app-new/android/gradlew.bat b/apps/skolplattformen-app-new/android/gradlew.bat
deleted file mode 100644
index 6689b85b..00000000
--- a/apps/skolplattformen-app-new/android/gradlew.bat
+++ /dev/null
@@ -1,92 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/apps/skolplattformen-app-new/android/settings.gradle b/apps/skolplattformen-app-new/android/settings.gradle
deleted file mode 100644
index e4bc8891..00000000
--- a/apps/skolplattformen-app-new/android/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-rootProject.name = 'app'
-apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
-include ':app'
-includeBuild('../node_modules/@react-native/gradle-plugin')
diff --git a/apps/skolplattformen-app-new/app.json b/apps/skolplattformen-app-new/app.json
deleted file mode 100644
index 71c44557..00000000
--- a/apps/skolplattformen-app-new/app.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "app",
- "displayName": "app",
- "schema": "oppnaskolplattformen://"
-}
diff --git a/apps/skolplattformen-app-new/assets/avatar.png b/apps/skolplattformen-app-new/assets/avatar.png
deleted file mode 100644
index 4bae0b00..00000000
Binary files a/apps/skolplattformen-app-new/assets/avatar.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/bankid_low_rgb.png b/apps/skolplattformen-app-new/assets/bankid_low_rgb.png
deleted file mode 100644
index 3931b98c..00000000
Binary files a/apps/skolplattformen-app-new/assets/bankid_low_rgb.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg b/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg
deleted file mode 100755
index 6031cee0..00000000
--- a/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
diff --git a/apps/skolplattformen-app-new/assets/boys.png b/apps/skolplattformen-app-new/assets/boys.png
deleted file mode 100644
index e7ecb44d..00000000
Binary files a/apps/skolplattformen-app-new/assets/boys.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/children.png b/apps/skolplattformen-app-new/assets/children.png
deleted file mode 100644
index 0a21526e..00000000
Binary files a/apps/skolplattformen-app-new/assets/children.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/OFL.txt b/apps/skolplattformen-app-new/assets/fonts/OFL.txt
deleted file mode 100644
index 246c977c..00000000
--- a/apps/skolplattformen-app-new/assets/fonts/OFL.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
-
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf
deleted file mode 100644
index a9520b78..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf
deleted file mode 100644
index ebfdd707..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf
deleted file mode 100644
index b94d47f3..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf
deleted file mode 100644
index e2e64456..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf
deleted file mode 100644
index 8f008c36..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf
deleted file mode 100644
index b2a9bf55..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf
deleted file mode 100644
index ee623825..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf
deleted file mode 100644
index e392492a..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf
deleted file mode 100644
index 46203996..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf
deleted file mode 100644
index 2ab02219..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf
deleted file mode 100644
index 6f9279da..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf
deleted file mode 100644
index e90e87ed..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf
deleted file mode 100644
index d8a251c7..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf
deleted file mode 100644
index be06e7fd..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf
deleted file mode 100644
index dabf7c24..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf
deleted file mode 100644
index 29d5f741..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf
deleted file mode 100644
index f5c0fdd5..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf
deleted file mode 100644
index b9100893..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins.zip b/apps/skolplattformen-app-new/assets/fonts/Poppins.zip
deleted file mode 100644
index 30d1b11e..00000000
Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins.zip and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/freja_eid_logo.png b/apps/skolplattformen-app-new/assets/freja_eid_logo.png
deleted file mode 100644
index 62183108..00000000
Binary files a/apps/skolplattformen-app-new/assets/freja_eid_logo.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/girls.png b/apps/skolplattformen-app-new/assets/girls.png
deleted file mode 100644
index 3a0a166a..00000000
Binary files a/apps/skolplattformen-app-new/assets/girls.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/kvinna.png b/apps/skolplattformen-app-new/assets/kvinna.png
deleted file mode 100644
index ea2e8850..00000000
Binary files a/apps/skolplattformen-app-new/assets/kvinna.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/assets/logo_print.svg b/apps/skolplattformen-app-new/assets/logo_print.svg
deleted file mode 100644
index a49325ce..00000000
--- a/apps/skolplattformen-app-new/assets/logo_print.svg
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
diff --git a/apps/skolplattformen-app-new/assets/man.png b/apps/skolplattformen-app-new/assets/man.png
deleted file mode 100644
index bd5d07d9..00000000
Binary files a/apps/skolplattformen-app-new/assets/man.png and /dev/null differ
diff --git a/apps/skolplattformen-app-new/components/__tests__/Absence.test.js b/apps/skolplattformen-app-new/components/__tests__/Absence.test.js
deleted file mode 100644
index 3a6901e6..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/Absence.test.js
+++ /dev/null
@@ -1,107 +0,0 @@
-import AsyncStorage from '@react-native-async-storage/async-storage'
-import { useRoute } from '@react-navigation/native'
-import { useUser } from '../../libs/hooks/src'
-import { fireEvent, waitFor } from '@testing-library/react-native'
-import Mockdate from 'mockdate'
-import React from 'react'
-import { useSMS } from '../../utils/SMS'
-import { render } from '../../utils/testHelpers'
-import Absence from '../absence.component'
-
-let sendSMS
-let user = { personalNumber: '201701092395' }
-
-jest.mock('../../utils/SMS')
-jest.mock('../../libs/hooks/src')
-
-const setup = (customProps = {}) => {
- sendSMS = jest.fn()
-
- useSMS.mockReturnValue({ sendSMS })
- useRoute.mockReturnValue({ params: { child: { id: '1' } } })
-
- const props = {
- ...customProps,
- }
-
- return render()
-}
-
-beforeAll(() => {
- // Hide errors from act
- // https://github.com/callstack/react-native-testing-library/issues/379
- jest.spyOn(console, 'error').mockImplementation(() => {
- // noop
- })
-})
-
-beforeEach(async () => {
- jest.clearAllMocks()
- useUser.mockReturnValue({
- data: user,
- status: 'loaded',
- })
- await AsyncStorage.clear()
-})
-
-test.skip('can fill out the form with full day absence', async () => {
- const screen = setup()
-
- await waitFor(() =>
- fireEvent.changeText(
- screen.getByTestId('personalIdentityNumberInput'),
- '1212121212'
- )
- )
- await waitFor(() => fireEvent.press(screen.getByText('Skicka')))
-
- expect(screen.queryByText(/starttid/i)).toBeFalsy()
- expect(screen.queryByText(/sluttid/i)).toBeFalsy()
-
- expect(sendSMS).toHaveBeenCalledWith('121212-1212')
-})
-
-test.skip('handles missing social security number', async () => {
- const screen = setup()
-
- await waitFor(() => fireEvent.press(screen.getByText('Skicka')))
-
- expect(screen.getByText(/Personnummer saknas/i)).toBeTruthy()
- expect(sendSMS).not.toHaveBeenCalled()
-})
-
-test.skip('validates social security number', async () => {
- const screen = setup()
-
- await waitFor(() =>
- fireEvent.changeText(
- screen.getByTestId('personalIdentityNumberInput'),
- '12121212'
- )
- )
- await waitFor(() => fireEvent.press(screen.getByText('Skicka')))
-
- expect(screen.getByText(/Personnumret är ogiltigt/i)).toBeTruthy()
- expect(sendSMS).not.toHaveBeenCalled()
-})
-
-test.skip('can fill out the form with part of day absence', async () => {
- Mockdate.set('2021-02-18 15:30')
-
- const screen = setup()
-
- await waitFor(() =>
- fireEvent.changeText(
- screen.getByTestId('personalIdentityNumberInput'),
- '1212121212'
- )
- )
- await waitFor(() => fireEvent.press(screen.getByText('Heldag')))
-
- expect(screen.getByText(/starttid/i)).toBeTruthy()
- expect(screen.getByText(/sluttid/i)).toBeTruthy()
-
- await waitFor(() => fireEvent.press(screen.getByText('Skicka')))
-
- expect(sendSMS).toHaveBeenCalledWith('121212-1212 1500-1700')
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/Children.test.js b/apps/skolplattformen-app-new/components/__tests__/Children.test.js
deleted file mode 100644
index 0d518993..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/Children.test.js
+++ /dev/null
@@ -1,239 +0,0 @@
-import 'setImmediate'
-import { useNavigation } from '@react-navigation/core'
-import {
- useApi,
- useCalendar,
- useChildList,
- useClassmates,
- useMenu,
- useNews,
- useNotifications,
- useSchedule,
- useTimetable,
-} from '../../libs/hooks/src'
-import React from 'react'
-import * as RNLocalize from 'react-native-localize'
-import { render } from '../../utils/testHelpers'
-import { translate } from '../../utils/translation'
-import { Children } from '../children.component'
-
-jest.mock('../../libs/hooks/src')
-
-const pause = (ms = 0) => new Promise((r) => setTimeout(r, ms))
-
-const setup = () => {
- return render()
-}
-
-beforeEach(() => {
- useApi.mockReturnValue({
- api: { on: jest.fn(), off: jest.fn(), logout: jest.fn() },
- isLoggedIn: false,
- })
- RNLocalize.findBestAvailableLanguage.mockImplementationOnce(() => ({
- languageTag: 'sv',
- isRTL: false,
- }))
- useCalendar.mockReturnValueOnce({ data: [], status: 'loaded' })
- useNotifications.mockReturnValueOnce({ data: [], status: 'loaded' })
- useNews.mockReturnValueOnce({ data: [], status: 'loaded' })
- useSchedule.mockReturnValueOnce({ data: [], status: 'loaded' })
- useMenu.mockReturnValueOnce({ data: [], status: 'loaded' })
- useTimetable.mockReturnValueOnce({ data: [], status: 'loaded' })
- useClassmates.mockReturnValueOnce({ data: [], status: 'loaded' })
- useNavigation.mockReturnValue({ navigate: jest.fn(), setOptions: jest.fn() })
-})
-
-test('renders loading state', async () => {
- useChildList.mockImplementationOnce(() => ({
- data: [],
- status: 'loading',
- }))
-
- const screen = setup()
- expect(screen.getByText(translate('general.loading'))).toBeTruthy()
-})
-
-test('renders empty state message', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [],
- status: 'loaded',
- }))
- const screen = setup()
-
- expect(
- screen.getByText(translate('children.noKids_description'))
- ).toBeTruthy()
-})
-
-test('renders error state message', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [],
- status: 'error',
- }))
-
- const screen = setup()
-
- expect(
- screen.getByText(translate('children.loadingErrorHeading'))
- ).toBeTruthy()
-})
-
-test('renders child in preschool', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson',
- status: 'F',
- },
- ],
- status: 'loaded',
- }))
-
- const screen = setup()
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
-})
-
-test('renders child in elementary school', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson',
- status: 'GR',
- },
- ],
- status: 'loaded',
- }))
-
- const screen = setup()
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
-})
-
-test('renders child in high school', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson',
- status: 'G',
- },
- ],
- status: 'loaded',
- }))
-
- const screen = setup()
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
- expect(
- screen.getByText(translate('abbrevations.upperSecondarySchool'))
- ).toBeTruthy()
-})
-
-test('renders multiple children', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Storasyster Testsson',
- status: 'G',
- },
- {
- name: 'Lillebror Testsson',
- status: 'GR',
- },
- ],
- status: 'loaded',
- }))
-
- const screen = setup()
-
- expect(screen.getByText('Storasyster Testsson')).toBeTruthy()
- expect(
- screen.getByText(translate('abbrevations.upperSecondarySchool'))
- ).toBeTruthy()
-
- expect(screen.getByText('Lillebror Testsson')).toBeTruthy()
- expect(
- screen.getByText(translate('abbrevations.compulsorySchool'))
- ).toBeTruthy()
-})
-
-test('renders child in class', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson',
- status: 'G',
- schoolID: 'Vallaskolan',
- },
- ],
- status: 'loaded',
- }))
- useClassmates.mockReset()
- useClassmates.mockImplementationOnce(() => ({
- data: [
- {
- className: '8C',
- },
- ],
- status: 'loaded',
- }))
- const screen = setup()
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
- expect(screen.getByText('8C • Vallaskolan')).toBeTruthy()
-})
-
-test('removes any parenthesis from name', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson (elev)',
- status: 'G',
- },
- ],
- status: 'loaded',
- }))
- const screen = setup()
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
-})
-
-test('handles multiple statuses for a child', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Test Testsson(elev)',
- status: 'G;GR;F',
- },
- ],
- status: 'loaded',
- }))
- const screen = setup()
-
- var multipleStatusesRendered = `${translate(
- 'abbrevations.upperSecondarySchool'
- )}, ${translate('abbrevations.compulsorySchool')}, ${translate(
- 'abbrevations.leisureTimeCentre'
- )}`
-
- expect(screen.getByText('Test Testsson')).toBeTruthy()
- expect(screen.getByText(multipleStatusesRendered)).toBeTruthy()
-})
-
-test('says if there is nothing new this week', () => {
- useChildList.mockImplementationOnce(() => ({
- data: [
- {
- name: 'Kanye West',
- status: 'F',
- },
- ],
- status: 'loaded',
- }))
- const screen = setup()
-
- expect(
- screen.getByText(translate('news.noNewNewsItemsThisWeek'))
- ).toBeTruthy()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js b/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js
deleted file mode 100644
index 3b47326e..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import { useClassmates } from '../../libs/hooks/src'
-import React from 'react'
-import { render } from '../../utils/testHelpers'
-import { ChildProvider } from '../childContext.component'
-import { Classmates } from '../classmates.component'
-
-jest.mock('../../libs/hooks/src')
-
-const defaultClassmates = [
- {
- className: '2B',
- firstname: 'Tyrell',
- lastname: 'Eriksson',
- guardians: [
- {
- firstname: 'Margaery',
- lastname: 'Eriksson',
- },
- {
- firstname: 'Loras',
- lastname: 'Eriksson',
- },
- ],
- },
- {
- className: '2B',
- firstname: 'Adam',
- lastname: 'Svensson',
- guardians: [
- {
- firstname: 'Eva',
- lastname: 'Svensson',
- },
- ],
- },
-]
-
-const setup = ({ classmates } = { classmates: defaultClassmates }) => {
- useClassmates.mockReturnValue({
- data: classmates,
- })
-
- return render(
-
-
-
- )
-}
-
-test('gets the classmates for a child from context', () => {
- setup()
-
- expect(useClassmates).toHaveBeenCalledWith({ id: 1 })
-})
-
-test('renders class name', () => {
- const screen = setup()
-
- expect(screen.getByText(/^klass 2b$/i)).toBeTruthy()
-})
-
-test('renders class without name', () => {
- const screen = setup({
- classmates: [],
- })
-
- expect(screen.getByText(/^klass$/i)).toBeTruthy()
-})
-
-test('renders classmates sorted by first name', () => {
- const screen = setup()
-
- expect(screen.getByLabelText('Barn 1')).toContainElement(
- screen.getByText(/adam svensson/i)
- )
- expect(screen.getByLabelText('Barn 2')).toContainElement(
- screen.getByText(/tyrell eriksson/i)
- )
-})
-
-test('renders guardians sorted by first name', () => {
- const screen = setup()
-
- expect(screen.getByText(/eva svensson/i)).toBeTruthy()
- expect(screen.getByText(/^loras eriksson, margaery eriksson$/i)).toBeTruthy()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js b/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js
deleted file mode 100644
index a9bf9720..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js
+++ /dev/null
@@ -1,137 +0,0 @@
-import { fireEvent } from '@testing-library/react-native'
-import React from 'react'
-import { Linking } from 'react-native'
-import { render } from '../../utils/testHelpers'
-import { ContactMenu } from '../contactMenu.component'
-import { act } from 'react-test-renderer'
-
-const defaultGuardian = {
- address: 'Testgatan',
- email: 'adam@adamsson.se',
- firstname: 'Adam',
- lastname: 'Adamsson',
- mobile: '0701234567',
-}
-
-const defaultProps = {
- contact: {
- guardians: [defaultGuardian],
- },
-}
-
-const setup = (customProps = {}) => {
- const props = {
- ...defaultProps,
- ...customProps,
- }
-
- return render()
-}
-
-beforeAll(() => {
- // Hide errors from state illegal state transition
- // Probably due to mock
- jest.spyOn(console, 'error').mockImplementation(() => {
- // noop
- })
-})
-
-beforeEach(jest.clearAllMocks)
-
-test('renders a parent', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- expect(screen.getByText(/adam adamsson/i)).toBeTruthy()
-})
-
-test('displays option to call and text guardian', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- fireEvent.press(screen.getByText(/ring/i))
- expect(Linking.openURL).toHaveBeenCalledWith('tel:0701234567')
-
- fireEvent.press(screen.getByText(/sms/i))
- expect(Linking.openURL).toHaveBeenCalledWith('sms:0701234567')
-})
-
-test('hides options to call and text if no phone number', () => {
- const guardianWithoutPhoneNumber = {
- contact: {
- guardians: [
- {
- ...defaultGuardian,
- mobile: null,
- },
- ],
- },
- }
-
- const screen = setup(guardianWithoutPhoneNumber)
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- expect(screen.queryByTestId('CallMenuItem')).toBeNull()
- expect(screen.queryByTestId('SMSMenuItem')).toBeNull()
-})
-
-test('displays option to email guardian', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- fireEvent.press(screen.getByText(/maila/i))
- expect(Linking.openURL).toHaveBeenCalledWith('mailto:adam@adamsson.se')
-})
-
-test('hides options to email phone number', () => {
- const guardianWithoutEmail = {
- contact: {
- guardians: [
- {
- ...defaultGuardian,
- email: null,
- },
- ],
- },
- }
-
- const screen = setup(guardianWithoutEmail)
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- expect(screen.queryByTestId('SendEmailMenuItem')).toBeNull()
-})
-
-test('displays address of guardian', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- fireEvent.press(screen.getByText(/adress/i))
- expect(Linking.openURL).toHaveBeenCalledWith(
- 'http://maps.apple.com/?daddr=Testgatan'
- )
-})
-
-test('hides address if it does not exist', () => {
- const guardianWithoutAddress = {
- contact: {
- guardians: [
- {
- ...defaultGuardian,
- address: null,
- },
- ],
- },
- }
-
- const screen = setup(guardianWithoutAddress)
-
- fireEvent.press(screen.getByTestId('ShowContactInfoButton'))
-
- expect(screen.queryByTestId('ShowHomeMenuItem')).toBeNull()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/Menu.test.js b/apps/skolplattformen-app-new/components/__tests__/Menu.test.js
deleted file mode 100644
index 4f7fad18..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/Menu.test.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import { useMenu } from '../../libs/hooks/src'
-import React from 'react'
-import { render } from '../../utils/testHelpers'
-import { translate } from '../../utils/translation'
-import { Menu } from '../menu.component'
-
-jest.mock('../../libs/hooks/src')
-
-const defaultItemList = [
- {
- title: 'Måndag vecka 10',
- description: 'Krämiga köttbullar',
- },
- {
- title: 'Tisdag vecka 10',
- description: 'Kryddig falukorv',
- },
- {
- title: 'Onsdag vecka 10',
- description: 'Sushi',
- },
-]
-
-const setup = (itemList = defaultItemList) => {
- useMenu.mockReturnValue({
- data: itemList,
- })
-
- return render()
-}
-
-test('renders multiple days', () => {
- const screen = setup()
-
- expect(screen.getByText('Måndag vecka 10')).toBeTruthy()
- expect(screen.getByText('Tisdag vecka 10')).toBeTruthy()
- expect(screen.getByText('Onsdag vecka 10')).toBeTruthy()
-})
-
-test('renders title and description', () => {
- const screen = setup()
-
- expect(screen.getByText('Måndag vecka 10')).toBeTruthy()
- expect(screen.getByText('Krämiga köttbullar')).toBeTruthy()
-})
-
-test('renders empty menu', () => {
- const screen = setup([])
- expect(screen.getByText(translate('menu.emptyText'))).toBeTruthy()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js b/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js
deleted file mode 100644
index 7d7670cf..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import { useApi, useNewsDetails } from '../../libs/hooks/src'
-import React from 'react'
-import { render } from '../../utils/testHelpers'
-import { NewsItem } from '../newsItem.component'
-
-jest.mock('../../libs/hooks/src')
-
-const defaultNewsItem = {
- author: 'Köket',
- fullImageUrl: 'test.png',
- header: 'K-bullar!',
- published: '2021-02-15T09:13:28.484Z',
- modified: '2021-02-15T09:13:28.484Z',
-}
-
-let navigation
-
-const setup = (customProps = { newsItem: {} }) => {
- useApi.mockReturnValue({ api: { getSessionCookie: jest.fn() } })
-
- useNewsDetails.mockReturnValue({
- data: {
- body: 'Nu blir det köttbullar',
- },
- })
-
- navigation = {
- goBack: jest.fn(),
- }
-
- const newsItem = {
- ...defaultNewsItem,
- ...customProps.newsItem,
- }
-
- const props = {
- navigation,
- route: {
- params: {
- child: { id: 1 },
- newsItem,
- },
- },
- ...customProps,
- }
-
- return render()
-}
-
-test('gets article details using useNewsDetails', async () => {
- setup()
-
- expect(useNewsDetails).toHaveBeenCalledWith({ id: 1 }, defaultNewsItem)
-})
-
-test('renders an article', () => {
- const screen = setup()
-
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText('Publicerad: 15 feb 2021 10:13')).toBeTruthy()
- expect(screen.getByText('Uppdaterad: 15 feb 2021 10:13')).toBeTruthy()
-})
-
-test('renders an article without published date if date is invalid', () => {
- const newsItemWithoutPublishedDate = {
- ...defaultNewsItem,
- published: '2020-08-16T21:10:00.000+02:0',
- }
- const screen = setup({ newsItem: newsItemWithoutPublishedDate })
-
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText('Uppdaterad: 15 feb 2021 10:13')).toBeTruthy()
- expect(screen.queryByText('Publicerad: Invalid DateTime')).toBeFalsy()
-})
-
-test('renders an article without modified date if date is invalid', () => {
- const newsItemWithoutPublishedDate = {
- ...defaultNewsItem,
- modified: null,
- }
- const screen = setup({ newsItem: newsItemWithoutPublishedDate })
-
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText('Publicerad: 15 feb 2021 10:13')).toBeTruthy()
- expect(screen.queryByText('Uppdaterad: Invalid DateTime')).toBeFalsy()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js b/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js
deleted file mode 100644
index 51321df0..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import { useNavigation } from '@react-navigation/native'
-import { fireEvent } from '@testing-library/react-native'
-import MockDate from 'mockdate'
-import React from 'react'
-import { render } from '../../utils/testHelpers'
-import { ChildProvider } from '../childContext.component'
-import { NewsListItem } from '../newsListItem.component'
-
-const defaultItem = {
- author: 'Köket',
- intro: 'Nu blir det köttbullar',
- header: 'K-bullar!',
- published: '2021-02-15T09:13:28.484Z',
- modified: '2021-02-15T09:13:28.484Z',
-}
-
-const setup = (customProps = {}) => {
- const props = {
- item: defaultItem,
- ...customProps,
- }
-
- return render(
-
-
-
- )
-}
-
-beforeEach(() => {
- MockDate.set('2021-02-15T09:30:28.484Z')
-})
-
-test('renders an article', () => {
- const screen = setup()
-
- expect(screen.getByText(/k-bullar!/i)).toBeTruthy()
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText('Köket • för 17 minuter sedan')).toBeTruthy()
-})
-
-test('renders article without date', () => {
- const itemWithInvalidDate = {
- ...defaultItem,
- published: null,
- modified: null,
- }
-
- const screen = setup({ item: itemWithInvalidDate })
-
- expect(screen.getByText(/k-bullar!/i)).toBeTruthy()
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText(/^köket$/i)).toBeTruthy()
-})
-
-test('falls back to modified date if no published date', () => {
- const itemWithInvalidDate = {
- ...defaultItem,
- published: null,
- }
-
- const screen = setup({ item: itemWithInvalidDate })
-
- expect(screen.getByText(/k-bullar!/i)).toBeTruthy()
- expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy()
- expect(screen.getByText('Köket • för 17 minuter sedan')).toBeTruthy()
-})
-
-test('navigates to news article on press', () => {
- const navigate = jest.fn()
- useNavigation.mockReturnValue({ navigate })
-
- const screen = setup()
-
- fireEvent.press(screen.getByText(/k-bullar!/i))
-
- expect(navigate).toHaveBeenCalledWith('NewsItem', {
- child: { id: 1 },
- newsItem: defaultItem,
- })
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/Notification.test.js b/apps/skolplattformen-app-new/components/__tests__/Notification.test.js
deleted file mode 100644
index 91bcec08..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/Notification.test.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import React from 'react'
-import { render } from '../../utils/testHelpers'
-import { Notification } from '../notification.component'
-import MockDate from 'mockdate'
-
-const defaultItem = {
- sender: 'Planering',
- category: 'Bedömning',
- dateCreated: '2021-02-15T09:13:28.484Z',
- dateModified: '2021-02-15T09:14:28.484Z',
-}
-
-// copied from https://github.com/react-native-webview/react-native-webview/issues/2934#issuecomment-1524101977
-jest.mock('react-native-webview', () => {
- const { View } = require('react-native')
- return {
- WebView: View,
- }
-})
-//
-
-const setup = (customProps = {}) => {
- const props = {
- item: defaultItem,
- ...customProps,
- }
-
- return render()
-}
-
-beforeEach(() => {
- MockDate.set('2021-02-15T09:30:28.484Z')
-})
-
-test('renders subtitle with modified date', () => {
- const screen = setup()
-
- expect(screen.getByText('Bedömning • för 16 minuter sedan')).toBeTruthy()
-})
-
-test('renders subtitle with created date', () => {
- const itemWithoutModifiedDate = {
- ...defaultItem,
- dateModified: undefined,
- }
-
- const screen = setup({ item: itemWithoutModifiedDate })
-
- expect(screen.getByText('Bedömning • för 17 minuter sedan')).toBeTruthy()
-})
-
-test('renders subtitle without date', () => {
- const itemWithoutDate = {
- ...defaultItem,
- dateCreated: undefined,
- dateModified: undefined,
- }
-
- const screen = setup({ item: itemWithoutDate })
-
- expect(screen.getByText('Bedömning')).toBeTruthy()
-})
-
-test('renders subtitle without category', () => {
- const itemWithoutCategory = {
- ...defaultItem,
- category: undefined,
- }
-
- const screen = setup({ item: itemWithoutCategory })
-
- expect(screen.getByText('för 16 minuter sedan')).toBeTruthy()
-})
diff --git a/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js b/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js
deleted file mode 100644
index 0dfbcc1b..00000000
--- a/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js
+++ /dev/null
@@ -1,133 +0,0 @@
-import { fireEvent } from '@testing-library/react-native'
-import React from 'react'
-import RNCalendarEvents from 'react-native-calendar-events'
-import Toast from 'react-native-simple-toast'
-import { render } from '../../utils/testHelpers'
-import { SaveToCalendar } from '../saveToCalendar.component'
-
-const defaultEvent = {
- title: 'Utvecklingssamtal',
- startDate: '2021-06-19 13:00',
- endDate: '2021-06-19 14:00',
- location: 'Gubbängsskolan',
-}
-
-const defaultProps = {
- event: defaultEvent,
-}
-
-const setup = (customProps = {}) => {
- const props = {
- ...defaultProps,
- ...customProps,
- }
-
- return render()
-}
-
-beforeAll(() => {
- // Hide errors from state illegal state transition
- // Probably due to mock
- jest.spyOn(console, 'error').mockImplementation(() => {
- // noop
- })
-})
-
-beforeEach(jest.clearAllMocks)
-
-test('renders save to calendar', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('actionsButton'))
-
- expect(screen.getByText(/Spara/i)).toBeTruthy()
-})
-
-test('requests calendar permissons', () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
-
- expect(RNCalendarEvents.requestPermissions).toHaveBeenCalled()
-})
-
-test('can save an event to the calendar', async () => {
- const screen = setup({
- event: {
- ...defaultEvent,
- location: null,
- description: null,
- },
- })
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
- await RNCalendarEvents.requestPermissions()
-
- expect(RNCalendarEvents.saveEvent).toHaveBeenCalledWith('Utvecklingssamtal', {
- startDate: '2021-06-19T11:00:00.000Z',
- endDate: '2021-06-19T12:00:00.000Z',
- })
-})
-
-test('removes any null values from the event', async () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
- await RNCalendarEvents.requestPermissions()
-
- expect(RNCalendarEvents.saveEvent).toHaveBeenCalledWith('Utvecklingssamtal', {
- startDate: '2021-06-19T11:00:00.000Z',
- endDate: '2021-06-19T12:00:00.000Z',
- location: 'Gubbängsskolan',
- })
-})
-
-test('calls toast with success', async () => {
- const screen = setup()
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
- await RNCalendarEvents.requestPermissions()
- await RNCalendarEvents.saveEvent()
-
- expect(Toast.showWithGravity).toHaveBeenCalledWith(
- '✔️ Sparad till kalender',
- 'short',
- 'bottom'
- )
-})
-
-test('says if something goes wrong', async () => {
- const screen = setup()
- RNCalendarEvents.saveEvent.mockRejectedValueOnce()
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
- await RNCalendarEvents.requestPermissions()
- await RNCalendarEvents.saveEvent()
-
- expect(Toast.showWithGravity).toHaveBeenCalledWith(
- 'Något gick fel',
- 'short',
- 'bottom'
- )
-})
-
-test('tells user if they havent authorized calendar', async () => {
- const screen = setup()
- RNCalendarEvents.requestPermissions.mockResolvedValueOnce('not auth')
-
- fireEvent.press(screen.getByTestId('actionsButton'))
- fireEvent.press(screen.getByText(/Spara/i))
- await RNCalendarEvents.requestPermissions()
- await RNCalendarEvents.saveEvent()
-
- expect(Toast.showWithGravity).toHaveBeenCalledWith(
- 'Du måste godkänna åtkomst till kalendern',
- 'short',
- 'bottom'
- )
-})
diff --git a/apps/skolplattformen-app-new/components/absence.component.tsx b/apps/skolplattformen-app-new/components/absence.component.tsx
deleted file mode 100644
index 05bfad47..00000000
--- a/apps/skolplattformen-app-new/components/absence.component.tsx
+++ /dev/null
@@ -1,280 +0,0 @@
-import { RouteProp, useRoute } from '@react-navigation/native'
-import { NativeStackNavigationOptions } from '@react-navigation/native-stack'
-import { useUser } from '../libs/hooks/src'
-import {
- Button,
- CheckBox,
- Input,
- StyleService,
- Text,
- useStyleSheet,
-} from '@ui-kitten/components'
-import { Formik } from 'formik'
-import moment from 'moment'
-import Personnummer from 'personnummer'
-import React, { useCallback } from 'react'
-import { View } from 'react-native'
-import DateTimePickerModal from 'react-native-modal-datetime-picker'
-import * as Yup from 'yup'
-import { defaultStackStyling } from '../design/navigationThemes'
-// import usePersonalStorage from '../hooks/usePersonalStorage';
-import useSettingsStorage from '../hooks/useSettingsStorage'
-import { Layout as LayoutStyle, Sizing, Typography } from '../styles'
-import { studentName } from '../utils/peopleHelpers'
-import { useSMS } from '../utils/SMS'
-import { translate } from '../utils/translation'
-import { AlertIcon } from './icon.component'
-import { RootStackParamList } from './navigation.component'
-import { NavigationTitle } from './navigationTitle.component'
-
-type AbsenceRouteProps = RouteProp
-
-interface AbsenceFormValues {
- displayStartTimePicker: boolean
- displayEndTimePicker: boolean
- personalIdentityNumber: string
- isFullDay: boolean
- startTime: moment.Moment
- endTime: moment.Moment
-}
-
-export const absenceRouteOptions =
- (darkMode: boolean) =>
- ({
- route,
- }: {
- route: RouteProp
- }): NativeStackNavigationOptions => {
- const child = route.params.child
- return {
- ...defaultStackStyling(darkMode),
- headerTitle: () => (
-
- ),
- }
- }
-
-const Absence = () => {
- const AbsenceSchema = Yup.object().shape({
- personalIdentityNumber: Yup.string()
- .required(translate('abscense.personalNumberMissing'))
- .test('is-valid', translate('abscense.invalidPersonalNumber'), (value) =>
- value ? Personnummer.valid(value) : true
- ),
- isFullDay: Yup.bool().required(),
- })
-
- const { data: user } = useUser()
- const route = useRoute()
- const { sendSMS } = useSMS()
- const { child } = route.params
- const [personalIdentityNumber, setPersonalIdentityNumber] = React.useState('')
- const [personalIdsFromStorage, setPersonalIdInStorage] = useSettingsStorage(
- 'childPersonalIdentityNumber'
- )
- const personalIdKey = `@childPersonalIdNumber.${child.id}`
- const minumumDate = moment().hours(8).minute(0)
- const maximumDate = moment().hours(17).minute(0)
- const styles = useStyleSheet(themedStyles)
-
- const submit = useCallback(
- async (values: AbsenceFormValues) => {
- const personalIdNumber = Personnummer.parse(
- values.personalIdentityNumber
- ).format()
-
- if (values.isFullDay) {
- sendSMS(personalIdNumber)
- } else {
- sendSMS(
- `${personalIdNumber} ${moment(values.startTime).format(
- 'HHmm'
- )}-${moment(values.endTime).format('HHmm')}`
- )
- }
-
- const toStore = {
- ...personalIdsFromStorage,
- ...{ [personalIdKey]: personalIdNumber },
- }
- setPersonalIdInStorage(toStore)
- },
- [personalIdKey, personalIdsFromStorage, sendSMS, setPersonalIdInStorage]
- )
-
- React.useEffect(() => {
- const personalIdFromStorage = personalIdsFromStorage[personalIdKey] || ''
- setPersonalIdentityNumber(personalIdFromStorage || '')
- }, [child, personalIdKey, personalIdsFromStorage, user])
-
- const initialValues: AbsenceFormValues = {
- displayStartTimePicker: false,
- displayEndTimePicker: false,
- personalIdentityNumber: personalIdentityNumber || '',
- isFullDay: true,
- startTime: moment().hours(Math.max(8, new Date().getHours())).minute(0),
- endTime: maximumDate,
- }
-
- return (
-
- {({
- handleChange,
- handleBlur,
- handleSubmit,
- setFieldValue,
- values,
- touched,
- errors,
- }) => {
- const hasError = (field: keyof typeof values) =>
- errors[field] && touched[field]
-
- return (
-
-
-
- {translate('abscense.childsPersonalNumber')}
-
-
- {hasError('personalIdentityNumber') && (
-
- {errors.personalIdentityNumber}
-
- )}
-
-
- setFieldValue('isFullDay', checked)}
- >
- {translate('abscense.entireDay')}
-
-
- {!values.isFullDay && (
-
-
-
- {translate('abscense.startTime')}
-
-
- {
- setFieldValue('startTime', date)
- setFieldValue('displayStartTimePicker', false)
- }}
- onCancel={() =>
- setFieldValue('displayStartTimePicker', false)
- }
- />
-
-
-
-
- {translate('abscense.endTime')}
-
-
- {
- setFieldValue('endTime', date)
- setFieldValue('displayEndTimePicker', false)
- }}
- onCancel={() =>
- setFieldValue('displayEndTimePicker', false)
- }
- />
-
-
- )}
-
-
- )
- }}
-
- )
-}
-
-export default Absence
-
-const themedStyles = StyleService.create({
- wrap: {
- ...LayoutStyle.flex.full,
- padding: Sizing.t4,
- backgroundColor: 'background-basic-color-2',
- },
- field: { marginBottom: Sizing.t4 },
- partOfDay: { ...LayoutStyle.flex.row, marginBottom: Sizing.t4 },
- spacer: { width: Sizing.t2 },
- inputHalf: { ...LayoutStyle.flex.full },
- input: {
- backgroundColor: 'background-basic-color-1',
- borderColor: 'color-input-border',
- },
- // TODO: Refactor to use mapping.json in eva design
- pickerButton: {
- backgroundColor: 'background-basic-color-1',
- },
- label: {
- ...Typography.fontSize.sm,
- ...Typography.fontWeight.bold,
- marginBottom: Sizing.t2,
- },
- error: {
- color: 'color-primary-600',
- },
-})
diff --git a/apps/skolplattformen-app-new/components/auth.component.tsx b/apps/skolplattformen-app-new/components/auth.component.tsx
deleted file mode 100644
index c1d6ba30..00000000
--- a/apps/skolplattformen-app-new/components/auth.component.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import { NativeStackNavigationOptions } from '@react-navigation/native-stack'
-import { StackNavigationProp } from '@react-navigation/stack'
-import {
- StyleService,
- Text,
- useStyleSheet,
- useTheme,
-} from '@ui-kitten/components'
-import React from 'react'
-import {
- Image,
- ImageStyle,
- Keyboard,
- TouchableOpacity,
- TouchableWithoutFeedback,
- View,
-} from 'react-native'
-import { useTranslation } from '../hooks/useTranslation'
-import { Layout as LayoutStyle, Sizing, Typography } from '../styles'
-import { fontSize } from '../styles/typography'
-import { KeyboardAvoidingView } from '../ui/keyboardAvoidingView.component'
-import { SafeAreaView } from '../ui/safeAreaView.component'
-import { SettingsIcon } from './icon.component'
-import { Login } from './login.component'
-import { RootStackParamList } from './navigation.component'
-
-const randomWord = (
- t: (scope: I18n.Scope, options?: I18n.TranslateOptions | undefined) => string
-) => {
- const words = t('auth.words')
- const keys = Object.keys(words)
-
- const randomIndex: number = Math.floor(Math.random() * keys.length)
- const argumentKey: string = keys[randomIndex]
-
- return words[argumentKey]
-}
-
-interface AuthProps {
- navigation: StackNavigationProp
-}
-
-export const authRouteOptions = (): NativeStackNavigationOptions => {
- return {
- headerShown: false,
- animationTypeForReplace: 'push',
- animation: 'fade',
- }
-}
-
-export const Auth: React.FC = ({ navigation }) => {
- const styles = useStyleSheet(themeStyles)
- const colors = useTheme()
- const { t } = useTranslation()
- // const t = (key: string) => key;
-
- return (
-
-
-
- navigation.navigate('Settings')}
- accessibilityHint={t(
- 'auth.a11y_navigate_to_settings'
- // defaultValue: 'Navigerar till vyn för inställningar',
- )}
- accessibilityLabel={t(
- 'auth.a11y_settings'
- // {
- // // defaultValue: 'Inställningar',
- // }
- )}
- >
-
-
- {t('general.settings')}
-
-
-
-
-
-
-
-
-
- Öppna skolplattformen
-
-
-
- {t('auth.subtitle', {
- word: randomWord(t),
- })}
-
-
-
-
-
-
-
- )
-}
-
-const themeStyles = StyleService.create({
- container: {
- ...LayoutStyle.mainAxis.flexStart,
- ...LayoutStyle.crossAxis.flexEnd,
- padding: Sizing.t6,
- },
- imageWrapper: {
- flex: 1,
- justifyContent: 'flex-end',
- },
- image: {
- ...Sizing.aspectRatio(1.5, Sizing.Ratio['4:3']),
- },
- content: {
- ...LayoutStyle.flex.full,
- },
- header: {
- width: '100%',
- marginBottom: Sizing.t5,
- fontFamily: 'Poppins-Black',
- fontWeight: '900',
- },
- subtitle: {
- width: '100%',
- textAlign: 'center',
- ...Typography.fontSize.xs,
- marginTop: Sizing.t5,
- },
- language: {
- flexDirection: 'row',
- alignItems: 'center',
- padding: Sizing.t3,
- paddingLeft: Sizing.t5,
- },
- languageText: {
- ...fontSize.sm,
- marginLeft: Sizing.t1,
- },
- settingsLink: {
- alignSelf: 'flex-start',
- zIndex: 1,
- },
-})
diff --git a/apps/skolplattformen-app-new/components/calendar.component.tsx b/apps/skolplattformen-app-new/components/calendar.component.tsx
deleted file mode 100644
index a5b9ead4..00000000
--- a/apps/skolplattformen-app-new/components/calendar.component.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-import { useCalendar } from '../libs/hooks/src'
-import { CalendarItem } from '@skolplattformen/api'
-import {
- Divider,
- List,
- ListItem,
- StyleService,
- Text,
- useStyleSheet,
-} from '@ui-kitten/components'
-import moment from 'moment'
-import React from 'react'
-import { Layout as LayoutStyle, Sizing, Typography } from '../styles'
-import { ListRenderItemInfo, RefreshControl, View } from 'react-native'
-
-import { translate } from '../utils/translation'
-import { useChild } from './childContext.component'
-import { CalendarOutlineIcon } from './icon.component'
-import { SaveToCalendar } from './saveToCalendar.component'
-import { Week } from './week.component'
-
-// const translate = (key: string) => key;
-
-export const Calendar = () => {
- const child = useChild()
- const { data, status, reload } = useCalendar(child)
- const styles = useStyleSheet(themedStyles)
-
- const formatStartDate = (startDate: moment.MomentInput) => {
- const date = moment(startDate)
- const output = `${date.format('dddd')} ${date.format(
- 'll'
- )} • ${date.fromNow()}`
-
- // Hack to remove year if it is this year
- const currentYear = moment().year().toString(10)
- return output.replace(currentYear, '')
- }
-
- const sortedData = () => {
- if (!data) {
- return []
- }
-
- return data.sort((a, b) =>
- a.startDate && b.startDate ? a.startDate.localeCompare(b.startDate) : 0
- )
- }
-
- return (
-
-
-
-
- {translate('calender.emptyHeadline')}
-
-
- {translate('calender.emptyText')}
-
-
- }
- renderItem={({ item }: ListRenderItemInfo) => (
- (
-
- {formatStartDate(item.startDate)}
-
- )}
- accessoryLeft={CalendarOutlineIcon}
- accessoryRight={() => }
- />
- )}
- refreshControl={
-
- }
- />
-
- )
-}
-
-const themedStyles = StyleService.create({
- container: {
- backgroundColor: 'background-basic-color-1',
- height: '100%',
- width: '100%',
- },
- description: {
- ...Typography.fontSize.xs,
- color: 'text-hint-color',
- },
- emptyState: {
- ...LayoutStyle.center,
- ...LayoutStyle.flex.full,
- },
- emptyStateHeadline: {
- ...Typography.align.center,
- margin: Sizing.t4,
- },
- emptyStateDescription: {
- ...Typography.align.center,
- lineHeight: 21,
- paddingHorizontal: Sizing.t3,
- margin: Sizing.t4,
- },
-})
diff --git a/apps/skolplattformen-app-new/components/child.component.tsx b/apps/skolplattformen-app-new/components/child.component.tsx
deleted file mode 100644
index e5bd91fb..00000000
--- a/apps/skolplattformen-app-new/components/child.component.tsx
+++ /dev/null
@@ -1,216 +0,0 @@
-import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
-import {
- getFocusedRouteNameFromRoute,
- RouteProp,
- useNavigation,
- useRoute,
-} from '@react-navigation/native'
-import { NativeStackNavigationOptions } from '@react-navigation/native-stack'
-// import {StackNavigationProp} from '@react-navigation/stack';
-import { Icon } from '@ui-kitten/components'
-import React, { useEffect } from 'react'
-// import {StyleProp, TextProps} from 'react-native';
-import { defaultStackStyling } from '../design/navigationThemes'
-import { useFeature } from '../hooks/useFeature'
-import { studentName } from '../utils/peopleHelpers'
-import { translate } from '../utils/translation'
-import { Calendar } from './calendar.component'
-import { ChildProvider } from './childContext.component'
-import { Classmates } from './classmates.component'
-import { Menu } from './menu.component'
-import { RootStackParamList } from './navigation.component'
-import { NavigationTitle } from './navigationTitle.component'
-import { NewsList } from './newsList.component'
-import { NotificationsList } from './notificationsList.component'
-import { TabBarLabel } from './tabBarLabel.component'
-
-// const translate = (key: string) => key;
-
-// type ChildNavigationProp = StackNavigationProp;
-type ChildRouteProps = RouteProp
-
-export type ChildTabParamList = {
- News: undefined
- Notifications: undefined
- Calendar: undefined
- Menu: undefined
- Classmates: undefined
-}
-
-// interface TabTitleProps {
-// children: string;
-// style?: StyleProp;
-// }
-
-const { Navigator, Screen } = createBottomTabNavigator()
-
-const NewsScreen = () =>
-const NotificationsScreen = () =>
-const CalendarScreen = () =>
-const MenuScreen = () =>
-const ClassmatesScreen = () =>
-
-interface ScreenSettings {
- NEWS_SCREEN: boolean
- NOTIFICATIONS_SCREEN: boolean
- CALENDER_SCREEN: boolean
- MENU_SCREEN: boolean
- CLASSMATES_SCREEN: boolean
-}
-
-const TabNavigator = ({
- initialRouteName = 'News',
- screenSettings,
-}: {
- initialRouteName?: keyof ChildTabParamList
- screenSettings: ScreenSettings
-}) => (
- {
- return {
- tabBarLabel: ({ focused }) => (
-
- ),
- tabBarIcon: ({ focused, color }) => {
- let iconName = 'news'
-
- if (route.name === 'News') {
- iconName = focused ? 'book-open' : 'book-open-outline'
- } else if (route.name === 'Notifications') {
- iconName = focused ? 'alert-circle' : 'alert-circle-outline'
- } else if (route.name === 'Calendar') {
- iconName = focused ? 'calendar' : 'calendar-outline'
- } else if (route.name === 'Menu') {
- iconName = focused ? 'clipboard' : 'clipboard-outline'
- } else if (route.name === 'Classmates') {
- iconName = focused ? 'people' : 'people-outline'
- }
- return
- },
- }
- }}
- >
- {screenSettings.NEWS_SCREEN && (
-
- )}
- {screenSettings.NOTIFICATIONS_SCREEN && (
-
- )}
- {screenSettings.CALENDER_SCREEN && (
-
- )}
- {screenSettings.MENU_SCREEN && (
-
- )}
- {screenSettings.CLASSMATES_SCREEN && (
-
- )}
-
-)
-
-const getHeaderTitle = (route: any) => {
- const routeName =
- getFocusedRouteNameFromRoute(route) ??
- route.params.initialRouteName ??
- 'News'
- return getRouteTitleFromName(routeName)
-}
-
-const getRouteTitleFromName = (routeName: string) => {
- switch (routeName) {
- case 'News':
- return translate('navigation.news')
- case 'Notifications':
- return translate('navigation.notifications')
- case 'Calendar':
- return translate('navigation.calender')
- case 'Menu':
- return translate('navigation.menu')
- case 'Classmates':
- return translate('navigation.classmates')
- default:
- return ''
- }
-}
-
-export const childRouteOptions =
- (darkMode: boolean) =>
- ({
- route,
- }: {
- route: RouteProp
- }): NativeStackNavigationOptions => {
- const { child } = route.params
-
- return {
- ...defaultStackStyling(darkMode),
- headerTitle: () => (
-
- ),
- }
- }
-
-export const Child = () => {
- const route = useRoute()
- const { child, initialRouteName } = route.params
- const useFoodMenu = useFeature('FOOD_MENU')
- const useClassList = useFeature('CLASS_LIST')
-
- const navigation = useNavigation()
-
- useEffect(() => {
- navigation.setOptions({ title: getHeaderTitle(route) })
- }, [navigation, route])
-
- const screenSettings: ScreenSettings = {
- NEWS_SCREEN: true,
- NOTIFICATIONS_SCREEN: true,
- CALENDER_SCREEN: true,
- MENU_SCREEN: useFoodMenu,
- CLASSMATES_SCREEN: useClassList,
- }
- return (
-
-
-
- )
-}
diff --git a/apps/skolplattformen-app-new/components/childContext.component.tsx b/apps/skolplattformen-app-new/components/childContext.component.tsx
deleted file mode 100644
index d4bbc51b..00000000
--- a/apps/skolplattformen-app-new/components/childContext.component.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Child } from '@skolplattformen/api'
-import React, { createContext, useContext } from 'react'
-
-interface ChildProviderProps {
- child: Child
- children: React.ReactNode
-}
-
-export const ChildContext = createContext({
- id: '',
- sdsId: '',
- name: '',
-})
-
-export const ChildProvider = ({ child, children }: ChildProviderProps) => {
- return {children}
-}
-
-export const useChild = () => useContext(ChildContext)
diff --git a/apps/skolplattformen-app-new/components/childListItem.component.tsx b/apps/skolplattformen-app-new/components/childListItem.component.tsx
deleted file mode 100644
index ee3a36b1..00000000
--- a/apps/skolplattformen-app-new/components/childListItem.component.tsx
+++ /dev/null
@@ -1,337 +0,0 @@
-import { useNavigation } from '@react-navigation/native'
-import { StackNavigationProp } from '@react-navigation/stack'
-import { Child } from '@skolplattformen/api'
-import {
- useCalendar,
- useClassmates,
- useMenu,
- useNews,
- useNotifications,
- useSchedule,
-} from '../libs/hooks/src'
-import {
- Button,
- StyleService,
- Text,
- useStyleSheet,
-} from '@ui-kitten/components'
-import moment, { Moment } from 'moment'
-import React, { useEffect } from 'react'
-import { Pressable, useColorScheme, View } from 'react-native'
-import { useTranslation } from '../hooks/useTranslation'
-import { Colors, Layout, Sizing } from '../styles'
-import { getMeaningfulStartingDate } from '../utils/calendarHelpers'
-import { studentName } from '../utils/peopleHelpers'
-import { DaySummary } from './daySummary.component'
-import { AlertIcon, RightArrowIcon } from './icon.component'
-import { RootStackParamList } from './navigation.component'
-import { StudentAvatar } from './studentAvatar.component'
-
-interface ChildListItemProps {
- child: Child
- color: string
- updated: string
- currentDate?: Moment
-}
-type ChildListItemNavigationProp = StackNavigationProp<
- RootStackParamList,
- 'Children'
->
-
-export const ChildListItem = ({
- child,
- color,
- updated,
- currentDate = moment(),
-}: ChildListItemProps) => {
- // Forces rerender when child.id changes
- React.useEffect(() => {
- // noop
- }, [child.id])
-
- const navigation = useNavigation()
-
- const { t } = useTranslation()
-
- const { data: notifications, reload: notificationsReload } =
- useNotifications(child)
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const { data: news, status: newsStatus, reload: newsReload } = useNews(child)
- const { data: classmates, reload: classmatesReload } = useClassmates(child)
- const { data: calendar, reload: calendarReload } = useCalendar(child)
- const { data: menu, reload: menuReload } = useMenu(child)
- const { data: schedule, reload: scheduleReload } = useSchedule(
- child,
- moment(currentDate).toISOString(),
- moment(currentDate).add(7, 'days').toISOString()
- )
-
- useEffect(() => {
- // Do not refresh if updated is empty (first render of component)
- if (updated === '') {
- return
- }
-
- newsReload()
- classmatesReload()
- notificationsReload()
- calendarReload()
- menuReload()
- scheduleReload()
-
- // Without eslint-disable below we get into a forever loop
- // because the function pointers to reload functions change on every reload.
- // I do not know a workaround for this.
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [updated])
-
- const notificationsThisWeek = notifications.filter(
- ({ dateCreated, dateModified }) => {
- const date = dateModified || dateCreated
- return date ? moment(date).isSame(moment(), 'week') : false
- }
- )
-
- const newsThisWeek = news.filter(({ modified, published }) => {
- const newsDate = modified || published
- return newsDate ? moment(newsDate).isSame(currentDate, 'week') : false
- })
-
- const scheduleAndCalendarThisWeek = [
- ...(calendar ?? []),
- ...(schedule ?? []),
- ].filter(({ startDate }) =>
- startDate
- ? moment(startDate).isBetween(
- moment(currentDate).startOf('day'),
- moment(currentDate).add(7, 'days')
- )
- : false
- )
-
- const displayDate = (inputDate: moment.MomentInput) => {
- return moment(inputDate).fromNow()
- }
-
- const getClassName = () => {
- // hack: we can find the class name (ex. 8C) from the classmates.
- // let's pick the first one and select theirs class
- // hack 2: we can find school namn in skola24 if child data is there
- if (classmates.length > 0) {
- return (
- classmates[0].className +
- (child.schoolID == null ? '' : ' • ' + child.schoolID)
- )
- }
-
- // Taken from Skolverket
- // https://www.skolverket.se/skolutveckling/anordna-och-administrera-utbildning/administrera-utbildning/skoltermer-pa-engelska
- const abbrevations = {
- G: t('abbrevations.upperSecondarySchool'),
- GR: t('abbrevations.compulsorySchool'),
- F: t('abbrevations.leisureTimeCentre'),
- FS: t('abbrevations.preSchool'),
- }
-
- return child.status
- ? child.status
- .split(';')
- .map((status) => {
- const statusAsAbbreviation = status as keyof typeof abbrevations
-
- return abbrevations[statusAsAbbreviation] || status
- })
- .join(', ')
- : null
- }
-
- const className = getClassName()
- const styles = useStyleSheet(themeStyles)
- const isDarkMode = useColorScheme() === 'dark'
- const meaningfulStartingDate = getMeaningfulStartingDate(currentDate)
-
- // Hide menu if we want to show monday but it is not monday yet.
- // The menu for next week is not available until monday
- const shouldShowLunchMenu =
- menu[meaningfulStartingDate.isoWeekday() - 1] &&
- !(
- meaningfulStartingDate.isoWeekday() === 1 &&
- currentDate.isoWeekday() !== 1
- )
-
- return (
- <>
-
-
- [
- styles.cardHeaderLeft || {},
- { opacity: pressed ? 0.5 : 1 },
- ]}
- onPress={() => navigation.navigate('Child', { child, color })}
- >
-
-
-
- {studentName(child.name)}
- {className ? {className} : null}
-
-
-
-
-
-
-
- ['' || {}, { opacity: pressed ? 0.5 : 1 }]}
- onPress={() =>
- navigation.navigate('Child', {
- child,
- color,
- initialRouteName: 'Calendar',
- })
- }
- >
-
-
- {scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => (
-
- {`${calendarItem.title} (${displayDate(calendarItem.startDate)})`}
-
- ))}
-
- ['' || {}, { opacity: pressed ? 0.5 : 1 }]}
- onPress={() =>
- navigation.navigate('Child', {
- child,
- color,
- initialRouteName: 'News',
- })
- }
- >
-
- {t('navigation.news')}
-
- {notificationsThisWeek.slice(0, 3).map((notification, i) => (
-
- {notification.message}
-
- ))}
- {newsThisWeek.slice(0, 3).map((newsItem, i) => (
-
- {newsItem.header ?? ''}
-
- ))}
-
-
- {scheduleAndCalendarThisWeek.length ||
- notificationsThisWeek.length ||
- newsThisWeek.length ? null : (
-
- {t('news.noNewNewsItemsThisWeek')}
-
- )}
-
- {shouldShowLunchMenu ? (
- ['' || {}, { opacity: pressed ? 0.5 : 1 }]}
- onPress={() =>
- navigation.navigate('Child', {
- child,
- color,
- initialRouteName: 'Menu',
- })
- }
- >
-
- {meaningfulStartingDate.format(
- '[' + t('schedule.lunch') + '] dddd'
- )}
-
-
- {menu[meaningfulStartingDate.isoWeekday() - 1]?.description}
-
-
- ) : null}
-
-
-
-
-
- >
- )
-}
-
-const themeStyles = StyleService.create({
- card: {
- borderRadius: 25,
- padding: Sizing.t5,
- marginBottom: Sizing.t4,
- backgroundColor: 'background-basic-color-1',
- },
- cardHeader: {
- ...Layout.flex.row,
- ...Layout.mainAxis.center,
- ...Layout.crossAxis.spaceBetween,
- marginBottom: Sizing.t4,
- },
- cardHeaderLeft: {
- ...Layout.flex.row,
- ...Layout.mainAxis.center,
- flex: 10,
- },
- cardHeaderRight: {
- ...Layout.flex.row,
- ...Layout.crossAxis.flexEnd,
- flex: 1,
- },
- cardHeaderText: {
- marginHorizontal: Sizing.t4,
- flex: 10,
- },
- icon: {
- width: 32,
- height: 32,
- },
- label: {
- marginTop: 10,
- },
- itemFooter: {
- ...Layout.flex.row,
- justifyContent: 'space-between',
- alignItems: 'flex-end',
- marginTop: Sizing.t4,
- },
- absenceButton: {
- marginLeft: -20,
- },
- itemFooterSpinner: {
- alignSelf: 'flex-end',
- },
- item: {
- marginRight: 12,
- paddingHorizontal: 2,
- paddingVertical: 0,
- marginBottom: 0,
- },
- noNewNewsItemsText: {},
-})
diff --git a/apps/skolplattformen-app-new/components/children.component.tsx b/apps/skolplattformen-app-new/components/children.component.tsx
deleted file mode 100644
index 8a7eba89..00000000
--- a/apps/skolplattformen-app-new/components/children.component.tsx
+++ /dev/null
@@ -1,214 +0,0 @@
-import { NavigationProp, useNavigation } from '@react-navigation/core'
-import { NativeStackNavigationOptions } from '@react-navigation/native-stack'
-import { Child } from '@skolplattformen/api'
-import { useApi, useChildList } from '../libs/hooks/src'
-import {
- Button,
- List,
- Spinner,
- StyleService,
- Text,
- TopNavigationAction,
- useStyleSheet,
-} from '@ui-kitten/components'
-import moment from 'moment'
-import React, { useCallback, useEffect, useState } from 'react'
-import {
- Image,
- ImageStyle,
- Linking,
- ListRenderItemInfo,
- View,
-} from 'react-native'
-import { defaultStackStyling } from '../design/navigationThemes'
-import AppStorage from '../services/appStorage'
-import { Layout as LayoutStyle, Sizing, Typography } from '../styles'
-import { translate } from '../utils/translation'
-import { ChildListItem } from './childListItem.component'
-import { RefreshIcon, SettingsIcon } from './icon.component'
-import { RootStackParamList } from './navigation.component'
-
-const colors = ['primary', 'success', 'info', 'warning', 'danger']
-
-export const childenRouteOptions =
- (darkMode: boolean) => (): NativeStackNavigationOptions => {
- return {
- ...defaultStackStyling(darkMode),
- title: translate('children.title'),
- headerLargeTitle: false,
- headerLargeTitleShadowVisible: false,
- }
- }
-
-export const Children = () => {
- const styles = useStyleSheet(themedStyles)
-
- const navigation = useNavigation>()
-
- const { api } = useApi()
- const { data: childList, status, reload } = useChildList()
- const reloadChildren = useCallback(() => {
- reload()
- setUpdated(moment().toISOString())
- }, [reload])
-
- const [updatedAt, setUpdated] = useState('')
-
- const logout = useCallback(() => {
- AppStorage.clearTemporaryItems().then(() => api.logout())
- }, [api])
-
- useEffect(() => {
- navigation.setOptions({
- headerLeft: () => {
- return (
- navigation.navigate('Settings')}
- />
- )
- },
- headerRight: () => {
- return (
- reloadChildren()}
- accessibilityHint="Reload"
- accessibilityLabel="Reload"
- />
- )
- },
- })
- }, [navigation, reloadChildren])
-
- // We need to skip safe area view here, due to the reason that it's adding a white border
- // when this view is actually lightgrey. Taking the padding top value from the use inset hook.
- return status === 'loaded' ? (
-
- {translate('children.noKids_title')}
-
- {translate('children.noKids_description')}
-
-
-
- }
- renderItem={({ item: child, index }: ListRenderItemInfo) => (
-
- )}
- />
- ) : (
-
-
- {status === 'error' ? (
-
- {translate('children.loadingErrorHeading')}
-
- {translate('children.loadingErrorInformationText')}
-
-
-
-
-
-
-
- ) : (
-
-
-
- {translate('general.loading')}
-
-
- )}
-
- )
-}
-
-const themedStyles = StyleService.create({
- topContainer: {
- ...LayoutStyle.flex.full,
- paddingBottom: 0,
- },
- loading: {
- ...LayoutStyle.center,
- ...LayoutStyle.flex.full,
- },
- loadingImage: {
- ...Sizing.aspectRatio(),
- },
- loadingMessage: {
- ...LayoutStyle.mainAxis.center,
- ...LayoutStyle.flex.row,
- marginTop: Sizing.t2,
- },
- loadingText: {
- marginLeft: Sizing.t5,
- },
- errorButtons: {
- height: Sizing.screen.height * 0.2,
- width: Sizing.screen.width * 0.73,
- justifyContent: 'space-evenly',
- },
- errorMessage: {
- height: Sizing.screen.height * 0.4,
- width: Sizing.screen.width * 0.73,
- justifyContent: 'space-evenly',
- alignItems: 'center',
- marginTop: Sizing.t2,
- },
- errorText: {
- marginBottom: Sizing.t3,
- },
- childList: {
- ...LayoutStyle.flex.full,
- },
- childListContainer: {
- paddingVertical: Sizing.t4,
- paddingHorizontal: Sizing.t3,
- },
- emptyState: {
- ...LayoutStyle.center,
- ...LayoutStyle.flex.full,
- paddingHorizontal: Sizing.t5,
- },
- emptyStateDescription: {
- ...Typography.align.center,
- lineHeight: 21,
- marginTop: Sizing.t2,
- },
- emptyStateImage: {
- ...Sizing.aspectRatio(0.8),
- marginTop: Sizing.t5,
- },
- topNavigationTitle: {
- ...Typography.fontWeight.semibold,
- },
-})
diff --git a/apps/skolplattformen-app-new/components/classmates.component.tsx b/apps/skolplattformen-app-new/components/classmates.component.tsx
deleted file mode 100644
index f9c701ef..00000000
--- a/apps/skolplattformen-app-new/components/classmates.component.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-import { Classmate } from '@skolplattformen/api'
-import { useClassmates } from '../libs/hooks/src'
-import {
- Divider,
- Icon,
- IconProps,
- List,
- ListItem,
- Text,
-} from '@ui-kitten/components'
-import React from 'react'
-import { ListRenderItemInfo, RefreshControl, StyleSheet } from 'react-native'
-import { fullName, guardians, sortByFirstName } from '../utils/peopleHelpers'
-import { translate } from '../utils/translation'
-import { useChild } from './childContext.component'
-import { ContactMenu } from './contactMenu.component'
-
-// const translate = (key: string) => key;
-
-// interface ClassmatesProps {
-// setSelected: (value?: number | null) => void;
-// }
-
-export const Classmates = () => {
- const child = useChild()
-
- const { data, status, reload } = useClassmates(child)
- const renderItemIcon = (props: IconProps) => (
-
- )
- const [selected, setSelected] = React.useState()
- const renderItem = ({ item, index }: ListRenderItemInfo) => (
- setSelected(item)}
- description={guardians(item.guardians)}
- accessoryLeft={renderItemIcon}
- accessoryRight={() => (
- setSelected(undefined)}
- />
- )}
- />
- )
- return (
-
- {data?.length
- ? `${translate('classmates.class')} ${data[0].className}`
- : translate('classmates.class')}
-
- }
- renderItem={renderItem}
- contentContainerStyle={styles.contentContainer}
- refreshControl={
-
- }
- />
- )
-}
-
-const styles = StyleSheet.create({
- container: {
- height: '100%',
- width: '100%',
- },
- contentContainer: {
- margin: 10,
- justifyContent: 'flex-start',
- },
- topContainer: {
- margin: 5,
- flexDirection: 'row',
- justifyContent: 'space-between',
- },
- listHeader: {
- paddingTop: 10,
- paddingLeft: 15,
- },
-})
diff --git a/apps/skolplattformen-app-new/components/contactMenu.component.tsx b/apps/skolplattformen-app-new/components/contactMenu.component.tsx
deleted file mode 100644
index 264de9e8..00000000
--- a/apps/skolplattformen-app-new/components/contactMenu.component.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-import { Classmate } from '@skolplattformen/api'
-import {
- Button,
- MenuGroup,
- MenuItem,
- OverflowMenu,
-} from '@ui-kitten/components'
-import React from 'react'
-import { Linking, StyleSheet } from 'react-native'
-import { fullName } from '../utils/peopleHelpers'
-import { translate } from '../utils/translation'
-import {
- CallIcon,
- EmailIcon,
- MapIcon,
- MoreIcon,
- SMSIcon,
-} from './icon.component'
-
-interface ContactMenuProps {
- contact: Classmate
- selected: boolean
- setSelected: (value?: number | null) => void
-}
-
-// const translate = (key: string) => key;
-
-export const ContactMenu = ({
- contact,
- selected,
- setSelected,
-}: ContactMenuProps) => {
- const [visible, setVisible] = React.useState(selected)
-
- const renderToggleButton = () => (
-