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

Single page app #3

Closed
wants to merge 23 commits into from
Closed

Single page app #3

wants to merge 23 commits into from

Conversation

Naveen-g09
Copy link

@Naveen-g09 Naveen-g09 commented Jan 2, 2024

  • create a single page only for tasks
  • add feature to drag to refresh the api call for tasks
  • add a time to refresh the api call for tasks (preferably every 5 minutes)
  • tasks will be fetched from api
  • table format is: name, number, city(optional), state(optional), target call count, created at(by default), modified at
  • call-logs should be configured to local database expo sqlite
  • call log databse table : Timestamp [Event at: ], Task ID [foreign key from api table], Call-Type [Event type] {a drop down with options outgoing, incoming, missed, unable to connect}, Duration of call

Tech stack

Drizzle
Expo-Sqlite

##Process

@sutyum sir update this, so it will be clear to me and will help me to learn

Copy link

sweep-ai bot commented Jan 2, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

github-actions bot commented Jan 2, 2024

🚀 Expo preview is ready!

  • Project → vvsales
  • Platforms → android, ios
  • Scheme → myapp
  • Runtime Version → 1.0.0
  • More info

Learn more about 𝝠 Expo Github Action

@sutyum
Copy link
Member

sutyum commented Jan 2, 2024

  • Use react query and drizzle to interface with sqlite instances
  • Add expo-sqlite and turso to interface through Drizzle
  • add function to sync CallLogs from mobile to cloud
  • add function to sync CallTasks from cloud to mobile
  • Fetch call logs from phone prepare to push to db
  • Trigger both syncs on refresh
  • add pull on refresh to the list

@Naveen-g09
Copy link
Author

@sutyum sir add comments in the code, wherever you feel something is lacking, will fix it first thing in morning

@sutyum
Copy link
Member

sutyum commented Jan 5, 2024

@sutyum sir add comments in the code, wherever you feel something is lacking, will fix it first thing in morning

is it working?

Copy link
Member

@sutyum sutyum left a comment

Choose a reason for hiding this comment

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

Your code is looking fine for what is needed here, as long as it works. I have avoided adding unnecessary improvements that you can make as we need to ship this fast and move to ella

name="info-circle"
size={25}
color={Colors[colorScheme ?? "light"].text}
className={`mr-15 ${
Copy link
Member

Choose a reason for hiding this comment

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

anything.ts Outdated Show resolved Hide resolved
@@ -10,7 +10,7 @@ export default function NotFoundScreen() {
<View className="flex-1 items-center justify-center p-5">
<Text className="text-2xl font-bold">This screen doesn't exist.</Text>

<Link href="/index" className="mt-4 py-4">
<Link href="/" className="mt-15 py-15">
Copy link
Member

Choose a reason for hiding this comment

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

This sort of styling will break on various screens, consider using auto margins instead

database.ts Outdated Show resolved Hide resolved
import { openDatabaseSync } from "expo-sqlite/next";
import path from "path";

import { callLogs, tasks } from "./schema";
Copy link
Member

Choose a reason for hiding this comment

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

'tasks' is defined but never used

lib/client.ts Outdated Show resolved Hide resolved
@@ -6,6 +6,9 @@ const config = getDefaultConfig(__dirname, {
// [Web-only]: Enables CSS support in Metro.
isCSSEnabled: true,
});

config.resolver.sourceExts.push("sql");
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Member

Choose a reason for hiding this comment

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

nice

@Naveen-g09
Copy link
Author

@sutyum sir add comments in the code, wherever you feel something is lacking, will fix it first thing in morning

is it working?

Nope, we figured out way to configure dual databases, and called sync function

some part of it is left
Migrations are working
So hopefully it will be done in the first half

@Naveen-g09
Copy link
Author

@sutyum sir please guide on work ahead
I believe zod implementation on schema is left and fetch and get request need to be refactored
currently it is a mess, If it is a 2 hours work, I will be do it tommorrow
Please guide me on how to resolve android bundling issue
image

@sutyum sutyum closed this Jan 10, 2024
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