Code Monkey home page Code Monkey logo

medicinesforlk-adminapi's Introduction

Agency Jekyll theme

Agency theme based on Agency bootstrap theme

How to use

###Portfolio

Portfolio projects are in '/_posts'

Images are in '/img/portfolio'

###About

Images are in '/img/about/'

###Team

Team members and info are in '_config.yml'

Images are in '/img/team/'

Demo

View this jekyll theme in action here

========= For more details, read documentation

medicinesforlk-adminapi's People

Contributors

amilaj avatar anupama-pathirage avatar ayeshlk avatar choreo-userapps-gitops-bot-prod avatar manuranga avatar nshamit avatar ratnajothy avatar sasindudilshara avatar shairam avatar thisaruguruge avatar udda1996 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

medicinesforlk-adminapi's Issues

GET /aidpackages/{id} doesn't return `itemID` field on quotation objects

GET /aidpackages/{id} doesn't return itemID field on quotation objects. As a result, it throws the follwing error when trying to edit an AidPackageItem or an aidPackage

data binding failed: error("{ballerina/lang.value}ConversionError",message="'map<json>' value cannot be converted to 'admin_api:AidPackageItem': 
		missing required field 'quotation.itemID' of type 'int' in record 'admin_api:Quotation'")

/pledge Doesn't contains donor information

GET /pledges/{id} doesn't contain the donor attribute. Also, it should be an object (currently it is sending an array)

expected:

  {
    "pledgeID": 2,
    "packageID": 1,
    "donorID": 1,
    "amount": 0,
    "status": "Pledged",
    "donor": {
      "donorID": 1,
      "orgName": "orgname",
      "orgLink": "orglink",
      "email": "email",
      "phoneNumber": "phonenumber"
    }
  }

received:

  [{
    "pledgeID": 2,
    "packageID": 1,
    "donorID": 1,
    "amount": 0,
    "status": "Pledged"
  }]

aidpackages POST does not accept needs

Currently, the POST request for /aidpackages does not accept a list of needs.

From the UI, we send an array of needs that will be covered when creating the package.
ex - [{id: 12, quantity: 1000}] the id here is the needs id.

Would it be possible to create the sub-items based on this?
Happy to make any changes to the request.

The UI implementation can be found here: LSFLK/MedicinesforLK#32
tagging @kulathilake who worked on the UI implementation.

Error in supplier quotation upload

Uploading the supplier quotation csv file throws an error

"data": "{ballerina/lang.int}NumberParsingError",
"status": 500,
"statusText": "Internal Server Error",

Inconsistent resource naming

resource naming seems inconsistent and hard to predict.

ex:
/aidPackage/{id}/pledges
/aidPackages/{id}/updatecomment/...
/aidpackages/{id}/aidpackageitems

Support multiple quotation differ by brand name

I changed the database to have the brand name as part of the quotation primary key. Initial aid package creation UI rendered fine.
But I could not enter separate valu

Screen.Recording.2022-10-06.at.5.12.56.PM.mov

es for both, when I change one other gets updated.

also when I click next I can only see on. HTTP POST is also sending only one quotation ID.
Screenshot 2022-10-06 at 5 13 37 PM

Screenshot 2022-10-06 at 5 15 29 PMScreenshot 2022-10-06 at 5 15 23 PM

Endpoint for aid package details for website home page

I'm working on wiring up this page.

I'm not sure which API we should call to the details pictured.
The closest I can think of is the get aid packages API.
Is that the correct API?

What fields should we use for

  • The image (dummy image?)
  • Title (name?)
  • Sub title
  • Description (description?)
  • Raised and goal amounts?

image

Can't update an aid package item

The following API throws a 500 error:

PUT /aidpackages/{id}/aidpackageitems

Sample payload:

{
   "packageItemID":3,
   "packageID":1,
   "quotationID":1,
   "needID":2,
   "quantity":1000,
   "totalAmount":0,
   "quotation":{
      "quotationID":1,
      "supplierID":1,
      "itemID":1,
      "brandName":"string",
      "availableQuantity":10000,
      "period":{
         "year":2022,
         "month":9,
         "day":1
      },
      "expiryDate":{
         "year":2022,
         "month":8,
         "day":10
      },
      "unitPrice":1000,
      "regulatoryInfo":"string"
   }
}

Response:

Error while executing SQL query: INSERT INTO AID_PACKAGE_ITEM(QUOTATIONID, PACKAGEID, NEEDID, QUANTITY)
                                        VALUES ( ? ,  ? ,
                                                 ? ,  ? );. Duplicate entry '1-2-1' for key 'aid_package_item.PRIMARY'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.