Skip to content

Sfr fixes part 2#52

Open
alaninnovates wants to merge 11 commits into
mainfrom
sfr-fixes-part-2
Open

Sfr fixes part 2#52
alaninnovates wants to merge 11 commits into
mainfrom
sfr-fixes-part-2

Conversation

@alaninnovates

Copy link
Copy Markdown
Member

No description provided.

@alaninnovates

Copy link
Copy Markdown
Member Author

uhhh i have no idea what i did but the code still works at least

@alaninnovates alaninnovates requested a review from Versus7 April 3, 2024 06:05
Comment thread app/src/components/form/Stepper.js Outdated
Comment thread app/src/screens/scouting-flow/ScoutingFlow.js
Comment thread app/src/components/modals/EditNoteModal.tsx
const {colors} = useTheme();
const [content, setContent] = useState<string>(note.content);

const saveNote = async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: not actually saving to DB. Judging by the RLS, I would guess it's because you need a policy allowing authenticated users to update their notes.

Screenshot 2024-04-10 at 10 55 22 PM

onSave({...note, content});
};

const styles = StyleSheet.create({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a huge fan of how much space there is underneath the save button. maybe rewrite using KeyboardAvoidingView?
Screenshot 2024-04-10 at 10 56 50 PM

Comment thread app/src/screens/search-flow/SearchScreen.tsx
console.log('storedFormData: ', storedFormData);
if (storedFormData != null) {
const data = JSON.parse(storedFormData);
setArrayData(data.arrayData);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a toast or some other indicator to the user that the form was loaded from offline storage / cache (use a more user-friendly term for this).

}}
onLongPress={() => {
if (!('id' in item)) {
Alert.alert('You cannot edit an offline note!');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can you not edit an offline note?

Comment thread app/src/components/modals/EditNoteModal.tsx Outdated
Comment thread app/src/components/modals/EditNoteModal.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants