Project - thenibirahmed/wp-client-management GitHub Wiki

Project overview page..

For topbar ->

Note: This is for all project overviews like invoices, revenue, dues, and the total project number.

   /projects-overview

For the projects table ->

Note: All projects with client names and other stuff must be shown below the overview topbar.

   /projects

Create a project ->

   /project/create

Note: We need a few API's according to the project create form need,

   /select-employee
   /select-client
   /select/project/status
   /select/project/priority

payload for creating a project ->

  {
      title : '',
      manager_id: , // this will come from the "/select-employee" endpoint 
      client_id: , // this will come from the "/select-client" endpoint
      status_id: , // this will come from the "/select/project/status" endpoint
      priority_id: , // this will come from the "/select/project/priority" endpoint.
      budget: ,
      start_date: '',
      due_date: '',
      assignee_ids: [], // That might be an array of team member ids, come from "/select-employee" api
}

Update a project ->

Endpoint ->

   /project/update/{id}

Note: We need a few API's according to the project update form need,

   /select-employee
   /select-client
   /select/project/status
   /select/project/priority

payload for creating a project ->

  {
      title : '',
      manager_id: , // this will come from the "/select-employee" endpoint 
      client_id: , // this will come from the "/select-client" endpoint
      status_id: , // this will come from the "/select/project/status" endpoint
      priority_id: , // this will come from the "/select/project/priority" endpoint.
      budget: ,
      start_date: '',
      due_date: '',
      assignee_ids: [], // That might be an array of team member IDs, come from the "/select-employee" API
}

There are a few tabs (tasks, invoices, notes, files, email). We have to call 1 API per tab.

Tasks

   /project/{id}/tasks

Invoices

   /project/{id}/invoices

Notes

   /project/{id}/notes

Files

   /project/{id}/files

Emails

   /project/{id}/emails

Create API for every tab item ->

Tasks

   /task/create

Note: We need two APIs to create a task:

   /select-employee
   /select/task/priority

Payload for creating task

 {
    title : '',
    assigned_to : ,  // this will come from the "/select-employee" endpoint
    priority_id : ,  // this will come from the "/select/project/priority" endpoint 
    start_date : '',
    end_date : ,
    description : ,
 }

Create an Invoice ->

Note: We need a few API's according to the project create form need,

   /select-project
   /select-currency
   /select-payment-method
   /select-employee // for showing the name in billing from 
   /select-client   // for selecting the client 
   /employee/{id}/details //for auto-filling address, phone number & email
   /client/{id}/details  // for auto-filling address , phone number & email 
   /select-client

Payload for creating an invoice

 {
    project_id : , // must be pre-selected from "/select-project" 
    title : '',
    invoice_number: '',
    payment_method_id : ,  // this will come from the "/select-payment-method" endpoint    
    currency_id : ,  // this will come from the "/select-currency" endpoint
    date: '',
    due_date: '',
    billing_address: '',  // this will come from "/client/{id}/details"
    billing_phone_number: , // "/client/{id}/details"
    billing_email: , // "/client/{id}/details"
    bill_from_address: '',  // this will come from "/employee/{id}/details"
    bill_from_phone_number: , // "/client/{id}/details"
    bill_from_email: , // "/client/{id}/details"
    note: '',

    // below data will come after the calculation of Invoice item ,
    sub_total: ,
    total: ,
    discount: ,
    tax: ,
    fee: ,
   
 }

Notes

   /note/create

Payload for creating note

 {
    project_id : ,  // selected project_id
    note: ''
 }

File Create

   /file/create

Payload for creating a file

 {
    project_id : ,  // selected project_id
    title : '',
    url : '' 
}

Update File

Endpoint

/file/update/{id}

Payload for updating a file

 {
    project_id : ,  // selected project_id
    title : '',
    url : '' 
}

Emails

   /email/create

Note: We need two APIs to create an email:

   /select-client

Payload for creating email

 {
    client_id : ,  // this will come from the "/select-project-client" endpoint
    project_id : ,  // selected project_id 
    subject : '',
    body : ,
 }

We have two single overview pages (task, email):

Single Email

   /email/{id}

Single Task

   /task/{id}

Note: In the single-task (/task/{id}) API response, all comments & replies are included. Please take a good look at the response

Add a comment on a task or reply to a task comment.

   /add-comment

Payload for Creating comment or reply

   {
       task_id : , // the selected task_id
       reply_to : , // if you selected any comment to send a reply to it. If there is a "reply_to" it is a reply , else top-level comment 
       comment : ''
   }