expertstatsplugin icon indicating copy to clipboard operation
expertstatsplugin copied to clipboard

Can we have the expert-to-expert transactions integrated?

Open loopzloopz opened this issue 4 years ago • 9 comments

Pretty pretty please! :)

I assume it is a challenge to count in the ones a user would send to a colleague, but it would be great if the stats would update the $ amount with the transactions received from other colleagues.

In essence, that's the more important angle - if we were to measure one VS the other :)

Pretty please! :D

loopzloopz avatar Jun 22 '21 01:06 loopzloopz

hey @loopzloopz

Wouldn't it be awesome to do a PR for it? Or anyone else who actually benefits from the expert to expert transfers? :)

I don't have any expert to expert transfers on my account to test it out, and I don't plan to have any in the near future.

First, I'd recommend you check if these data are available in an API call. If they are, then it should be straight forward

  • Consider the expert a client
  • Store hem in the clients table
  • Store the transaction in the transactions table

There you are :)

If you want to make it more fancy, you can flag the client as "expert" and the transaction as "expert" so you can have different tables (clients / experts) and have different graphs stats (experts vs clients)

Let me know if you need any further help, happy to jump in a call with you (or whoever else wants to participate) and help out, but I cannot develop it right now

PanosSynetos avatar Jun 22 '21 06:06 PanosSynetos

Thank you, my brother from another mother! :)

I'm basically "API illiterate" but I'm gonna harass a couple of Codeablers to do this for us :p

loopzloopz avatar Jun 22 '21 18:06 loopzloopz

Is this request different from this? image

Source: https://community.codeable.io/t/expert-community-update-june-2021/2222

atwellpub avatar Jun 22 '21 19:06 atwellpub

Yes @atwellpub - That's exactly it. And for this functionality, we need to know the relevant API calls and JSON returns, that we need to do in our plugin, in order to show the expert to expert funds.

Currently, our plugin only tracks funds that we as experts receive from clients (normal and additional tasks). It doesn't show the funds we receive from other experts, and we'd like to implement this.

Any insights you can share @atwellpub , feel free :)

PanosSynetos avatar Jun 23 '21 05:06 PanosSynetos

@kirilhristov @depy

Tagging the product team for more information. Good luck!

atwellpub avatar Jun 23 '21 16:06 atwellpub

I'm not sure this will help, but expert-to-expert transfers show up just like all other transactions, except the description is "ad_hoc_team_work".

image

  {
    "id": 201044,
    "description": "ad_hoc_team_work",
    "timestamp": 1622105083,
    "task_type": "Task",
    "created_at": "2021-05-27T08:44:43.390Z",
    "amount": 100,
    "fee_percentage": 0,
    "fee_amount": 0,
    "full_refund_correction_prior_to_fee_fix": 0,
    "payment_details": null,
    "debited_account_id": 661,
    "debited_account_name": "Danny Vittensonn",
    "credited_account_id": 1819,
    "credited_account_name": "Bogman Rider",
    "credit_amounts": [
      {
        "id": 745330,
        "amount": 100,
        "account": "user_1819"
      }
    ],
    "debit_amounts": [
      {
        "id": 745331,
        "amount": 100,
        "account": "user_661"
      }
    ],
    "task": {
      "id": 111,
      "title": "Single sign on ",
      "kind": "uncategorized",
      "parent_task_id": null,
      "current_user_is_preferred_contractor": false,
      "retainer": false,
      "invoice_url": null
    },
    "task_client": {
      "id": 569,
      "full_name": "Dana R.",
      "role": "client",
      "last_sign_in_at": "2014-07-16T09:05:43.093Z",
      "rsa_public_key": null,
      "pro": false,
      "timezone_offset": 240,
      "status": null,
      "available": null,
      "avatar": {
        "tiny_url": "https://storage.googleapis.com/avatars-staging.codeable.io/default-avatars/tiny.png",
        "small_url": "https://storage.googleapis.com/avatars-staging.codeable.io/default-avatars/small.png",
        "medium_url": "https://storage.googleapis.com/avatars-staging.codeable.io/default-avatars/medium.png",
        "large_url": "https://storage.googleapis.com/avatars-staging.codeable.io/default-avatars/large.png"
      }
    }
  },
  {

kirilhristov avatar Jun 30 '21 11:06 kirilhristov

Thanks Kiro. I think it should be enough, anyone who is familiar with the API calls, can dissect the plugin and understand what to do.

On my end, it's not possible to work on it, not before September :(

PanosSynetos avatar Jun 30 '21 13:06 PanosSynetos

Kiro, brato, I like your balance.

Will you marry me?

loopzloopz avatar Jun 30 '21 13:06 loopzloopz

Hey @kakoma :) Would you like to have a go at this one, now that you're fresh with your commits? :)

I just merged your PR and bumped up the version. Thank you!

PanosSynetos avatar Jul 20 '21 05:07 PanosSynetos