Skip to content

Commit

Permalink
Merge branch 'main' into chore/tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kgeek33 committed Feb 5, 2025
2 parents 11959d8 + 80a173b commit 92a7c3d
Show file tree
Hide file tree
Showing 27 changed files with 717 additions and 122 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ android {
applicationId 'xyz.getpapillon.app'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7820
versionName "7.8.2"
versionCode 7830
versionName "7.8.3"
}
signingConfigs {
debug {
Expand Down
Binary file added assets/images/mask_stripes_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_long_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/Papillon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = xyz.getpapillon.ios;
PRODUCT_NAME = Papillon;
PRODUCT_NAME = "Papillon";
SWIFT_OBJC_BRIDGING_HEADER = "Papillon/Papillon-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -486,7 +486,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = xyz.getpapillon.ios;
PRODUCT_NAME = Papillon;
PRODUCT_NAME = "Papillon";
SWIFT_OBJC_BRIDGING_HEADER = "Papillon/Papillon-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
42 changes: 9 additions & 33 deletions ios/Papillon/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
{
"images" : [
"images": [
{
"filename" : "Icon-Light-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "Icon-Dark-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"filename" : "Icon-Tinted-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
"filename": "App-Icon-1024x1024@1x.png",
"idiom": "universal",
"platform": "ios",
"size": "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
"info": {
"version": 1,
"author": "expo"
}
}
}
2 changes: 1 addition & 1 deletion ios/Papillon/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>7.8.2</string>
<string>7.8.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
46 changes: 44 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "papillonvex",
"version": "7.8.2",
"version": "7.8.3",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
Expand All @@ -12,6 +12,7 @@
"dependencies": {
"@birdwingo/react-native-reanimated-graph": "^1.1.3",
"@candlefinance/app-icon": "^0.4.5",
"@howljs/calendar-kit": "^2.2.1",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.0.1",
Expand Down
6 changes: 4 additions & 2 deletions src/components/Home/AccountSwitcherContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ const ContextMenu: React.FC<{
key={index}
onPress={() => {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Soft);
switchTo(account).then(() => {
setOpened(false);
setOpened(false);

requestAnimationFrame(() => {
switchTo(account);
});
}}
style={({ pressed }) => [
Expand Down
9 changes: 8 additions & 1 deletion src/consts/DefaultTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,12 @@ export const defaultTabs = [
description: "Tes compétences et évaluations",
icon: require("@/../assets/lottie/tab_evaluations.json"),
enabled: true,
}
},
{
tab: "Week",
label: "Semaine",
description: "Vue avancée de la semaine",
icon: require("@/../assets/lottie/tab_calendar.json"),
enabled: true,
},
] as const;
1 change: 1 addition & 0 deletions src/router/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type RouteParameters = {
autoAdd?: boolean;
};
LessonDocument: { lesson: Homework };
Week: { outsideNav?: boolean };

Homeworks?: { outsideNav?: boolean };
HomeworksDocument: { homework: Homework };
Expand Down
7 changes: 7 additions & 0 deletions src/router/screens/account/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import createScreen from "@/router/helpers/create-screen";
import Lessons from "@/views/account/Lessons/Lessons";
import Week from "@/views/account/Week/Week";
import Homeworks from "@/views/account/Homeworks/Homeworks";
import HomeStackScreen from "./home";
import Menu from "@/views/account/Restaurant/Menu";
Expand All @@ -21,6 +22,12 @@ export const screens = [
tabBarLabel: "Cours",
tabBarLottie: require("@/../assets/lottie/tab_calendar.json"),
}),
createScreen("Week", Week, {
headerTitle: "Semaine",
headerShown: false,
tabBarLabel: "Semaine",
tabBarLottie: require("@/../assets/lottie/tab_calendar.json"),
}),
createScreen("Homeworks", Homeworks, {
headerTitle: "Devoirs",
headerShown: false,
Expand Down
29 changes: 18 additions & 11 deletions src/services/attendance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,24 @@ export async function updateAttendancePeriodsInCache <T extends Account> (accoun
break;
}
case AccountService.Local: {
periods = [
{
name: "Toutes",
startTimestamp: new Date("2021-09-01").getTime(), //not relevant to ED
endTimestamp: new Date("2022-06-30").getTime(),
},
];

defaultPeriod = "Toutes";
if (account.identityProvider.identifier == "iut-lannion") {
const { saveIUTLanPeriods } = await import("./iutlan/grades");
const data = await saveIUTLanPeriods(account);

break;
periods = data.periods;
defaultPeriod = data.defaultPeriod;
break;
} else {
periods = [
{
name: "Toutes",
startTimestamp: 1609459200,
endTimestamp: 1622505600,
},
];
defaultPeriod = "Toutes";
break;
}
}
case AccountService.Skolengo: {
const { getPeriod } = await import("./skolengo/data/period");
Expand Down Expand Up @@ -86,7 +93,7 @@ export async function updateAttendanceInCache <T extends Account> (account: T, p
case AccountService.Local: {
if (account.identityProvider.identifier == "iut-lannion") {
const { saveIUTLanAttendance } = await import("./iutlan/attendance");
const data = await saveIUTLanAttendance(account);
const data = await saveIUTLanAttendance(account, periodName);

attendance = {
delays: data.delays,
Expand Down
9 changes: 6 additions & 3 deletions src/services/iutlan/attendance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ interface scodocData {
[key: string]: Array<scodocAbsence>;
}

export const saveIUTLanAttendance = async (account: LocalAccount): Promise<Attendance> => {
export const saveIUTLanAttendance = async (
account: LocalAccount,
periodName: string
): Promise<Attendance> => {
try {
const scodocData = account.identityProvider.rawData.absences as scodocData;
const scodocData = account.serviceData.semestres[periodName].absences as scodocData;
const allAbsences: Array<Absence> = [];

if (scodocData && Object.keys(scodocData).length > 0) {
Expand All @@ -35,7 +38,7 @@ export const saveIUTLanAttendance = async (account: LocalAccount): Promise<Atten
fromTimestamp: from ? new Date(from).getTime() : 0,
toTimestamp: to ? new Date(to).getTime() : 0,
justified: absence.justifie ?? false,
hours: (parseInt(absence.fin) - parseInt(absence.debut)) + "h 00",
hours: parseInt(absence.fin) - parseInt(absence.debut) + "h 00",
administrativelyFixed: absence.justifie ?? false,
reasons: undefined,
});
Expand Down
Loading

0 comments on commit 92a7c3d

Please sign in to comment.