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

Refactoring-Layout #4

Open
wants to merge 47 commits into
base: dev
Choose a base branch
from
Open

Refactoring-Layout #4

wants to merge 47 commits into from

Conversation

Naveen-g09
Copy link

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

  • Fetch tasks from cloud flare
    Set pull to refresh
    Set auto refresh every 30 seconds
  • React Native immediate call Feature
  • Fetch call logs and update to turso db after filtering
  • Settings page, for user profile(with mobile-number)
  • Filter Call Logs and display based on tasks table
  • Make UI Interactive
  • Final App logo and stuff

Copy link

sweep-ai bot commented Jan 10, 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

sweep-ai bot commented Jan 10, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:



[!CAUTION]

An error has occurred: Message is too long, max tokens is -24876 (tracking ID: eab85d1b13)

Copy link

github-actions bot commented Jan 10, 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

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.

I have left some comments to fix performance.

There are a bunch of consistency issues in the code in terms of style, use of direct deserialisation (no zod), different setting used for the UI and the cloudflare worker, etc.

Given this project is needed to be shipped asap, we will ignore those minor issues.

Hope this apk works

expodb.config.ts Outdated Show resolved Hide resolved
lib/db_helpers.ts Outdated Show resolved Hide resolved
lib/permissions.ts Outdated Show resolved Hide resolved
worker-turso-ts/src/index.ts Outdated Show resolved Hide resolved
worker-turso-ts/src/index.ts Outdated Show resolved Hide resolved
worker-turso-ts/src/index.ts Outdated Show resolved Hide resolved

router.get('/tasks', async () => {
const client = buildLibsqlClient(env);
const rs = await client.execute('select * from tasks');
Copy link
Member

Choose a reason for hiding this comment

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

select * from tasks where assigned_to is me

function buildRouter(env: Env): RouterType {
const router = Router();

router.get('/tasks', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

it must be passed a phone number! (the number of the mobile of the sales agent)

Copy link
Member

Choose a reason for hiding this comment

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

You will need to add a UI to get the user's phone number. Just put it in a settings tab

@sutyum
Copy link
Member

sutyum commented Jan 10, 2024

updates here? @Naveen-g09

@Naveen-g09
Copy link
Author

Tried, multiple builds
I cannot figure out why it is not posting call logs to turso
My permissions are working, I cannot figure out and slowly losing hope :(

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.

ready?

@Naveen-g09 Naveen-g09 changed the title App Build Refactoring-Layout Jan 15, 2024
Copy link
Author

@Naveen-g09 Naveen-g09 left a comment

Choose a reason for hiding this comment

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

@sutyum sir can you check why POST is not working even though I tried setting up CORS in cloudFlare workers.

In terms of other works This PR is ready

  1. tasks are being fetched from database
  2. Call logs are shown based on filtering
  3. Number and Duration are shown

Issues:

  1. No POST Requests to database

@Naveen-g09
Copy link
Author

@PrinceBaghel258025 I will be back by 5, please help me to finish it

@Naveen-g09
Copy link
Author

Naveen-g09 commented Jan 17, 2024

This app gives the list of Clients to call, and fetches its logs from mobile
Cloud flare Worker handles Post and fetch

There is a settings page modal, which will save user number which will be his identity and it should fetch calls assigned to him

Issues:

  1. Configure Cloudflare worker to just post the callLogs, that's it.

Screenshot_1705506428

I will refactor the UI. please pull the latest commit of this branch

additionally:
add ZOD if possible

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