mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 04:34:55 -06:00
make POST requests to /quantity to update the quantity of an existing food item - then mixin the new quantity with the existing food items observable
17 lines
561 B
JavaScript
17 lines
561 B
JavaScript
// @flow
|
|
export const QUANTITY_NONE: 'none' = 'none';
|
|
export const QUANTITY_FEW: 'few' = 'few';
|
|
export const QUANTITY_MANY: 'many' = 'many';
|
|
export const QUANTITY_LOTS: 'lots' = 'lots';
|
|
|
|
export const QUANTITIES = [QUANTITY_NONE, QUANTITY_FEW, QUANTITY_LOTS, QUANTITY_MANY];
|
|
|
|
export type Quantity = typeof QUANTITY_NONE | typeof QUANTITY_FEW | typeof QUANTITY_MANY | typeof QUANTITY_LOTS;
|
|
|
|
export type QuantityResponse = {
|
|
food_item_id: string,
|
|
quantity: Quantity,
|
|
date: number,
|
|
};
|
|
|
|
export type QuantityFragment = { quantity: Quantity, lastupdated: number };
|