Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/single file screen #83

Merged
merged 46 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f3d7021
feat(AWS-routes): aws routes
patela22 Mar 28, 2024
45f3664
feat(Delete-File-Route-Working): delete route for files are working i…
patela22 Apr 4, 2024
4ad46aa
feat(Fixed-routes): works
patela22 Apr 5, 2024
275e532
fix(Fixed-File-Routes-in-the-frontend): made the buttons work
patela22 Apr 5, 2024
716edaa
fix: added stuff to RIles
patela22 Apr 5, 2024
e41bbd5
fix(main): merged main
patela22 Apr 5, 2024
bab64e3
feat(Files-Upload): added files and header and other stuff
patela22 Apr 10, 2024
48ae7fb
feat(go): go
patela22 Apr 10, 2024
b60cc06
feat(view-files-complete): view files compelte
patela22 Apr 11, 2024
7325ae4
fix(getting-ready-to-pr): pr
patela22 Apr 11, 2024
5392bbd
fix(routes-formatting): routes
patela22 Apr 11, 2024
970f38d
fix(random-styling): fixes
patela22 Apr 11, 2024
b2cb41a
fix(format): format
patela22 Apr 11, 2024
3bd716a
fix(should-be-good-now): format
patela22 Apr 11, 2024
48dac33
Update client/services/file.ts
patela22 Apr 11, 2024
9a3e0c9
Update client/services/file.ts
patela22 Apr 11, 2024
0a113cb
Update client/services/file.ts
patela22 Apr 11, 2024
686599d
Update client/services/file.ts
patela22 Apr 11, 2024
715975d
Update client/screens/FileViewScreen.tsx
patela22 Apr 11, 2024
2d589dd
Update client/services/file.ts
patela22 Apr 11, 2024
19cdc3d
Update client/screens/FileViewScreen.tsx
patela22 Apr 11, 2024
8327201
feat(files): updating files
patela22 Apr 11, 2024
ac9d351
Merge branch 'feature/aws-file-routes' of https://github.com/Generate…
patela22 Apr 11, 2024
06eee7d
fix(files): files overlapping
patela22 Apr 11, 2024
8a973ea
style(routes): reformating
patela22 Apr 11, 2024
3253a4b
fix(files): routes updated
patela22 Apr 12, 2024
0816f76
refactor(plus): deleted
patela22 Apr 13, 2024
6951842
fix(task): grey border
patela22 Apr 13, 2024
67f0cc3
fix(text): font
patela22 Apr 13, 2024
c37d0e9
feat(view-files): view files in a bigger screen
patela22 Apr 15, 2024
bceab23
fix(Merged-main): main is added to branch again
patela22 Apr 15, 2024
844ac6e
feat: some data
MattCMcCoy Apr 18, 2024
347dcdb
Merge branch 'main' into feature/data
MattCMcCoy Apr 18, 2024
2aa027d
fix: task details page
MattCMcCoy Apr 18, 2024
bd7a930
feat: LFG More data and tasks
MattCMcCoy Apr 18, 2024
0714d24
Merge branch 'main' into feature/data
MattCMcCoy Apr 18, 2024
789b916
feat: all around fixes that i noticed
MattCMcCoy Apr 18, 2024
cc1d5e7
Merge branch 'main' into feature/data
MattCMcCoy Apr 18, 2024
442fbef
refactor: colors and missing task id????
MattCMcCoy Apr 18, 2024
7bf28b0
refactor: revert migrations folder changes
MattCMcCoy Apr 18, 2024
1cd68e1
fix: db changes bc i forgot stuff changed in past few merges
MattCMcCoy Apr 18, 2024
f7445eb
fix: category pills from not rendering correctly
MattCMcCoy Apr 19, 2024
7dc08ff
fix: more general fixes everywhere
MattCMcCoy Apr 19, 2024
53c1628
fix: transparencies on home page
MattCMcCoy Apr 19, 2024
4df5133
Merge branch 'feature/data' into feature/single-file-screen
MattCMcCoy Apr 19, 2024
8c50573
Merge branch 'main' into feature/single-file-screen
MattCMcCoy Apr 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/components/file_management/FileTile.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import React from 'react';
import { Text, View } from 'react-native';

import { useNavigation } from '@react-navigation/native';
import { WebView } from 'react-native-webview';

import { AppStackNavigation } from '../../navigation/types';

interface FileTileProps {
name: string;
label: string;
url: string;
}

export function FileTile({ name, label, url }: FileTileProps): JSX.Element {
const navigation = useNavigation<AppStackNavigation>();
return (
<View className="mx-5 my-3 bg-carewallet-white">
<View
className="mx-5 my-3 bg-carewallet-white"
onTouchEnd={() => navigation.navigate('SingleFile', { url, name, label })}
>
<View className="flex-1 flex-row rounded-md border border-carewallet-gray p-4">
<View className="mr-4 h-[7vh] w-[7vh]">
<WebView
Expand Down
14 changes: 6 additions & 8 deletions client/components/file_management/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ export function Header() {
return (
<SafeAreaView className="bg-carewallet-white/80">
<View className="carewallet-manrope-bold flex flex-row items-center justify-between border-b border-carewallet-lightgray bg-carewallet-white pb-4">
<View className="pl-1">
<View className="pl-3">
<BackButton />
</View>
<Text className="mx-auto font-carewallet-manrope-bold text-xl text-carewallet-blue">
View Files
</Text>
<View className="">
<View
className="right-3 h-12 w-12 items-center justify-center rounded-xl bg-carewallet-blue font-carewallet-manrope"
onTouchEnd={() => navigation.navigate('FileUploadScreen')}
>
<Text className="text-4xl text-carewallet-white">+</Text>
</View>
<View
className="right-3 mr-3 h-12 w-12 items-center justify-center rounded-xl bg-carewallet-blue font-carewallet-manrope"
onTouchEnd={() => navigation.navigate('FileUploadScreen')}
>
<Text className="text-4xl text-carewallet-white">+</Text>
</View>
</View>
</SafeAreaView>
Expand Down
2 changes: 2 additions & 0 deletions client/navigation/containers/ProfileNavigationContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FileViewScreen from '../../screens/FileViewScreen';
import PatientView from '../../screens/Profile/PatientView';
import Profile from '../../screens/Profile/Profile';
import Settings from '../../screens/Profile/Settings';
import SingleFile from '../../screens/SingleFile';
import SingleTaskScreen from '../../screens/SingleTask';
import TaskList from '../../screens/TaskList';
import { AppStack } from '../types';
Expand All @@ -26,6 +27,7 @@ export function ProfileNavigationContainer() {
<AppStack.Screen name="TaskList" component={TaskList} />
<AppStack.Screen name="TaskDisplay" component={SingleTaskScreen} />
<AppStack.Screen name="FileViewScreen" component={FileViewScreen} />
<AppStack.Screen name="SingleFile" component={SingleFile} />
</AppStack.Navigator>
);
}
1 change: 1 addition & 0 deletions client/navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type AppStackParamList = {
FileUploadScreen: undefined;
FileViewScreen: undefined;
Landing: undefined;
SingleFile: { url: string; name: string; label: string };
Calendar: undefined;
Notifications: undefined;
TaskType: undefined;
Expand Down
31 changes: 31 additions & 0 deletions client/screens/SingleFile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import { SafeAreaView, Text, View } from 'react-native';

import { RouteProp } from '@react-navigation/native';
import WebView from 'react-native-webview';

Check warning on line 5 in client/screens/SingleFile.tsx

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

Using exported name 'WebView' as identifier for default export

import { BackButton } from '../components/nav_buttons/BackButton';
import { AppStackParamList } from '../navigation/types';

type SingleFileProps = RouteProp<AppStackParamList, 'SingleFile'>;

export default function SingleFile({ route }: { route: SingleFileProps }) {
const { url } = route.params;

return (
<SafeAreaView className="flex-1 bg-carewallet-white">
<View className="flex-row items-center justify-between border-b border-carewallet-lightgray bg-carewallet-white px-3 pb-4">
<BackButton />
<Text className="flex-1 pr-20 text-center text-xl font-bold text-carewallet-blue">
View Files
</Text>
</View>
<View className="flex-1">
<WebView
source={{ uri: url }}
className="flex-1 rounded-md border border-carewallet-gray"
/>
</View>
</SafeAreaView>
);
}
Loading