Skip to content

Commit

Permalink
Merge branch 'develop' into 5137.2-Requisition-line-edit-+-UI-updates…
Browse files Browse the repository at this point in the history
…-to-line-columns
  • Loading branch information
roxy-dao committed Nov 4, 2024
2 parents 522b565 + 5ecf2f8 commit 957c5e2
Show file tree
Hide file tree
Showing 106 changed files with 2,278 additions and 157 deletions.
5 changes: 2 additions & 3 deletions client/packages/android/build_remote_server_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
export AR=${NDK_BIN}/llvm-ar
export CC_armv7_linux_androideabi=${NDK_BIN}/armv7a-linux-androideabi22-clang

# Build arm64-v8a:aarch64-linux-android and armeabi-v7a:armv7-linux-androideabi
# Build arm64-v8a:aarch64-linux-android (Defined in cargo.toml)
PATH=PATH=$PATH:$NDK_BIN \
cargo build \
--release \
Expand All @@ -16,5 +16,4 @@ PATH=PATH=$PATH:$NDK_BIN \
--target-dir="$(pwd)/server-lib"

# Copy built .so files to jniLib
cp "server-lib/aarch64-linux-android/release/libremote_server_android.so" "app/src/main/jniLibs/arm64-v8a/"
cp "server-lib/armv7-linux-androideabi/release/libremote_server_android.so" "app/src/main/jniLibs/armeabi-v7a/"
cp "server-lib/aarch64-linux-android/release/libremote_server_android.so" "app/src/main/jniLibs/arm64-v8a/"
13 changes: 8 additions & 5 deletions client/packages/common/src/intl/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"description.fc-sell-price": "Foreign currency sell price per pack",
"description.forecast-quantity": "Forecast Quantity to Reach Target",
"description.initial-stock-on-hand": "Stock on hand on the first day of the program period",
"description.available-stock": "The customer's initial stock on hand + incoming stock + inventory adjustments - outgoing stock",
"description.available-stock": "The customer's initial stock on hand + incoming stock +/- inventory adjustments - outgoing stock",
"description.invoice-number": "Shipment number",
"description.last-reading-datetime": "Date and time of the last reading",
"description.max-min-temperature": "Maximum or minimum temperature reading",
Expand Down Expand Up @@ -231,6 +231,7 @@
"error.failed-to-create-prescription": "Failed to create prescription!",
"error.failed-to-create-requisition": "Failed to create requisition! {{message}}",
"error.failed-to-create-return": "Failed to create return!",
"error.failed-to-delete-item-variant": "Failed to delete item variant",
"error.failed-to-generate-excel": "Failed to generate Excel",
"error.failed-to-generate-report": "Failed to generate report",
"error.failed-to-save-item-variant": "Failed to save item variant",
Expand Down Expand Up @@ -474,8 +475,7 @@
"heading.user-sync": "User Synchronisation Status",
"heading.username": "Username",
"immunisations": "Immunizations",
"inbound-shipment": "Inbound Shipment",
"inbound-shipments": "Inbound Shipments",
"inbound-shipment": "Inbound Shipments",
"indicators-demographics": "Demographics",
"info.automatic-return": "This return was created automatically, as the result of an Supplier Return in another store.",
"info.automatic-return-no-edit": "You are unable to edit details until the status is confirmed as Delivered.",
Expand Down Expand Up @@ -736,6 +736,7 @@
"label.item_many": "Items",
"label.item_one": "Item",
"label.item_other": "Items",
"label.item-variant": "Item Variant",
"label.items-expiring-before": "Items expiring before",
"label.items-no-stock_few": "Items with no stock",
"label.items-no-stock_many": "Items with no stock",
Expand Down Expand Up @@ -1175,6 +1176,7 @@
"messages.confirm-delete-invoice-lines_many": "This will permanently remove {{count}} lines from this invoice",
"messages.confirm-delete-invoice-lines_one": "This will permanently remove 1 line from this invoice",
"messages.confirm-delete-invoice-lines_other": "This will permanently remove {{count}} lines from this invoice",
"messages.confirm-delete-item-variant": "This will permanently delete this item variant",
"messages.confirm-delete-lines_few": "This will permanently remove {{count}} lines from this prescription",
"messages.confirm-delete-lines_many": "This will permanently remove {{count}} lines from this prescription",
"messages.confirm-delete-lines_one": "This will permanently remove 1 line from this prescription",
Expand Down Expand Up @@ -1260,6 +1262,7 @@
"messages.deleted-generic_other": "Deleted {{count}} records",
"messages.deleted-immunisation-programs_one": "Deleted {{count}} immunization program",
"messages.deleted-immunisation-programs_other": "Deleted {{count}} immunization programs",
"messages.deleted-item-variant": "Item variant successfully deleted",
"messages.deleted-lines_few": "Deleted {{count}} lines",
"messages.deleted-lines_many": "Deleted {{count}} lines",
"messages.deleted-lines_one": "Deleted {{count}} line",
Expand Down Expand Up @@ -1453,7 +1456,7 @@
"messages.zero-return-quantity-will-delete-lines": "There are no return quantities specified. Click OK again to confirm and remove these lines from the return.",
"monitoring": "Monitoring",
"multiple": "[multiple]",
"outbound-shipment": "Outbound Shipment",
"outbound-shipment": "Outbound Shipments",
"outbound-shipments": "Outbound Shipments",
"patients": "Patients",
"placeholder.enter-an-item-code-or-name": "Enter item code or name",
Expand Down Expand Up @@ -1639,4 +1642,4 @@
"warning.caps-lock": "Warning: Caps lock is on",
"warning.field-not-parsed": "{{field}} not parsed",
"warning.nothing-to-supply": "Nothing left to supply!"
}
}
3 changes: 1 addition & 2 deletions client/packages/common/src/intl/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@
"heading.username": "Nombre de usuario",
"immunisations": "Inmunizaciones",
"inbound-shipment": "Entradas",
"inbound-shipments": "Entradas",
"indicators-demographics": "Demografía",
"info.automatic-return": "Esta devolución se creó automáticamente como resultado de una Devolución de Proveedor en otro almacén.",
"info.automatic-return-no-edit": "No puedes editar los detalles hasta que el estado se confirme como Entregado.",
Expand Down Expand Up @@ -1363,4 +1362,4 @@
"label.breach-end": "Fin de la excursión",
"label.breach-start": "Inicio de la excursión",
"label.breaches": "Excursiones"
}
}
3 changes: 1 addition & 2 deletions client/packages/common/src/intl/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
"heading.username": "Nom d'utilisateur",
"immunisations": "Vaccinations",
"inbound-shipment": "Bon de livraison",
"inbound-shipments": "Bons de livraison",
"indicators-demographics": "Données démographiques",
"info.automatic-return": "Ce retour client a été créé automatiquement, suite à un retour fournisseur créé dans un autre dépôt.",
"info.automatic-return-no-edit": "Vous ne pouvez modifier cette transaction que lorsque le statut est confirmé comme \"Livré(e)\"",
Expand Down Expand Up @@ -1537,4 +1536,4 @@
"warning.caps-lock": "Avertissement: Verrouillage majuscule activé",
"warning.field-not-parsed": "{{field}} non analysé",
"warning.nothing-to-supply": "La quantité demandée à été fournie !"
}
}
3 changes: 1 addition & 2 deletions client/packages/common/src/intl/locales/pt/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@
"heading.user-sync": "Estado de sincronização de utilizador",
"heading.username": "Nome do usuário",
"inbound-shipment": "Entrada",
"inbound-shipments": "Entradas",
"info.automatic-shipment": "Esta entrada foi criada automaticamente, como um resultado de um Envio de outro local.",
"info.automatic-shipment-no-edit": "Você não pode editar os detalhes até que o status seja confirmado como Entregue.",
"info.cannot-edit-program-requisition": "Não foi possível editar o fornecedor, mínimo MDE, máximo MDE ou adicionar itens a uma requisição do programa.",
Expand Down Expand Up @@ -1159,4 +1158,4 @@
"error.no-customer-return-items": "Nenhum artigo foi adicionado a esse retorno.",
"error.no-customer-returns": "Não há devoluções de Clientes para mostrar.",
"error.no-immunisation-programs": "Não foram encontrados programas de imunização"
}
}
3 changes: 1 addition & 2 deletions client/packages/common/src/intl/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@
"heading.username": "Имя пользователя",
"immunisations": "Прививки",
"inbound-shipment": "Входящие Поставки",
"inbound-shipments": "Входящие Поставки",
"indicators-demographics": "Демография",
"info.automatic-return": "Этот возврат был создан автоматически в результате Исходящего Возврата в другом хранилище.",
"info.automatic-return-no-edit": "Вы не можете редактировать детали, пока статус не будет подтвержден как Доставлено.",
Expand Down Expand Up @@ -1498,4 +1497,4 @@
"messages.cant-return-shipment-replenishment": "Невозможно вернуть строки, пока статус не станет «Доставлено»",
"messages.changing-max-mos": "Это изменит целевые месяцы запасов.",
"messages.changing-min-mos": "Это изменит порог перезаказа на месяцы запасов."
}
}
1 change: 0 additions & 1 deletion client/packages/common/src/intl/locales/tet/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@
"heading.transport-details": "Detaliu Transportasaun",
"heading.username": "Naran Ujuáriu",
"inbound-shipment": "Remessa Sasan Tama",
"inbound-shipments": "Remessas sasan sira ne'ebe tama",
"info.automatic-shipment": "Remessa ne'e kria Automatiku, tanba iha remessa Sasan Sai iha Store seluk. Ita labele hadia detaliu sira ne'e, antes estatus konfirmadu hanesan entrega tiha ona.",
"info.manual-shipment": "Remessa ne'e kria ho manual. Status 'entrega tiha ona' sei la atualiza automatiku.",
"info.no-shipment": "Finaliza requizisaun ida ne'e sei prevene ita husi kria remessa ida ba ida ne'e.",
Expand Down
48 changes: 47 additions & 1 deletion client/packages/common/src/types/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,17 @@ export type ClinicianSortInput = {

export type CliniciansResponse = ClinicianConnector;

export type ColdStorageTypeConnector = {
__typename: 'ColdStorageTypeConnector';
nodes: Array<ColdStorageTypeNode>;
totalCount: Scalars['Int']['output'];
};

export type ColdStorageTypeFilterInput = {
id?: InputMaybe<EqualFilterStringInput>;
name?: InputMaybe<EqualFilterStringInput>;
};

export type ColdStorageTypeNode = {
__typename: 'ColdStorageTypeNode';
id: Scalars['String']['output'];
Expand All @@ -973,6 +984,23 @@ export type ColdStorageTypeNode = {
name: Scalars['String']['output'];
};

export enum ColdStorageTypeSortFieldInput {
Id = 'id',
Name = 'name'
}

export type ColdStorageTypeSortInput = {
/**
* Sort query result is sorted descending or ascending (if not provided the default is
* ascending)
*/
desc?: InputMaybe<Scalars['Boolean']['input']>;
/** Sort query result by `key` */
key: ColdStorageTypeSortFieldInput;
};

export type ColdStorageTypesResponse = ColdStorageTypeConnector;

export type ConfigureNamePropertiesResponse = Success;

export type ConfigureNamePropertyInput = {
Expand Down Expand Up @@ -1191,6 +1219,7 @@ export type CustomerReturnLineNode = {
item: ItemNode;
itemCode: Scalars['String']['output'];
itemName: Scalars['String']['output'];
itemVariantId?: Maybe<Scalars['String']['output']>;
note?: Maybe<Scalars['String']['output']>;
numberOfPacksIssued?: Maybe<Scalars['Float']['output']>;
numberOfPacksReturned: Scalars['Float']['output'];
Expand Down Expand Up @@ -3202,6 +3231,7 @@ export type InvoiceLineNode = {
itemCode: Scalars['String']['output'];
itemId: Scalars['String']['output'];
itemName: Scalars['String']['output'];
itemVariantId?: Maybe<Scalars['String']['output']>;
location?: Maybe<LocationNode>;
locationId?: Maybe<Scalars['String']['output']>;
locationName?: Maybe<Scalars['String']['output']>;
Expand Down Expand Up @@ -3541,6 +3571,7 @@ export type ItemVariantMutationsUpsertItemVariantArgs = {

export type ItemVariantNode = {
__typename: 'ItemVariantNode';
coldStorageType?: Maybe<ColdStorageTypeNode>;
coldStorageTypeId?: Maybe<Scalars['String']['output']>;
dosesPerUnit?: Maybe<Scalars['Int']['output']>;
id: Scalars['String']['output'];
Expand Down Expand Up @@ -4662,6 +4693,8 @@ export type NameFilterInput = {
isCustomer?: InputMaybe<Scalars['Boolean']['input']>;
/** Filter by donor property */
isDonor?: InputMaybe<Scalars['Boolean']['input']>;
/** Filter by manufacturer property */
isManufacturer?: InputMaybe<Scalars['Boolean']['input']>;
/** Is this name a store */
isStore?: InputMaybe<Scalars['Boolean']['input']>;
/** Filter by supplier property */
Expand Down Expand Up @@ -5369,6 +5402,8 @@ export type Queries = {
barcodeByGtin: BarcodeResponse;
centralPatientSearch: CentralPatientSearchResponse;
clinicians: CliniciansResponse;
/** Query omSupply "cold_storage_type" entries */
coldStorageTypes: ColdStorageTypesResponse;
contactTraces: ContactTraceResponse;
currencies: CurrenciesResponse;
customerProgramRequisitionSettings: Array<CustomerProgramRequisitionSettingNode>;
Expand Down Expand Up @@ -5620,6 +5655,14 @@ export type QueriesCliniciansArgs = {
};


export type QueriesColdStorageTypesArgs = {
filter?: InputMaybe<ColdStorageTypeFilterInput>;
page?: InputMaybe<PaginationInput>;
sort?: InputMaybe<Array<ColdStorageTypeSortInput>>;
storeId: Scalars['String']['input'];
};


export type QueriesContactTracesArgs = {
filter?: InputMaybe<ContactTraceFilterInput>;
page?: InputMaybe<PaginationInput>;
Expand Down Expand Up @@ -6863,6 +6906,7 @@ export type StockLineNode = {
item: ItemNode;
itemId: Scalars['String']['output'];
itemName: Scalars['String']['output'];
itemVariantId?: Maybe<Scalars['String']['output']>;
location?: Maybe<LocationNode>;
locationId?: Maybe<Scalars['String']['output']>;
locationName?: Maybe<Scalars['String']['output']>;
Expand Down Expand Up @@ -7634,7 +7678,7 @@ export type UpdateInboundShipmentLineInput = {
expiryDate?: InputMaybe<Scalars['NaiveDate']['input']>;
id: Scalars['String']['input'];
itemId?: InputMaybe<Scalars['String']['input']>;
itemVariantId?: InputMaybe<Scalars['String']['input']>;
itemVariantId?: InputMaybe<NullableStringUpdate>;
location?: InputMaybe<NullableStringUpdate>;
numberOfPacks?: InputMaybe<Scalars['Float']['input']>;
packSize?: InputMaybe<Scalars['Float']['input']>;
Expand Down Expand Up @@ -7708,6 +7752,7 @@ export type UpdateLocationErrorInterface = {

export type UpdateLocationInput = {
code?: InputMaybe<Scalars['String']['input']>;
coldStorageTypeId?: InputMaybe<Scalars['String']['input']>;
id: Scalars['String']['input'];
name?: InputMaybe<Scalars['String']['input']>;
onHold?: InputMaybe<Scalars['Boolean']['input']>;
Expand Down Expand Up @@ -8147,6 +8192,7 @@ export type UpdateStockLineInput = {
costPricePerPack?: InputMaybe<Scalars['Float']['input']>;
expiryDate?: InputMaybe<Scalars['NaiveDate']['input']>;
id: Scalars['String']['input'];
itemVariantId?: InputMaybe<NullableStringUpdate>;
location?: InputMaybe<NullableStringUpdate>;
onHold?: InputMaybe<Scalars['Boolean']['input']>;
sellPricePerPack?: InputMaybe<Scalars['Float']['input']>;
Expand Down
2 changes: 1 addition & 1 deletion client/packages/common/src/utils/environment/EnvUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const mapRoute = (route: string): RouteMapping => {
return { title: 'customers', docs: '/distribution/customers/' };
case inRoute(AppRoute.InboundShipment):
return {
title: 'inbound-shipments',
title: 'inbound-shipment',
docs: '/replenishment/inbound-shipments/',
};
case inRoute(AppRoute.SupplierReturn):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const ReplenishmentWidget: React.FC<PropsWithChildrenOnly> = () => {
error={error as ApiException}
isError={isError}
isLoading={isLoading}
title={t('inbound-shipments', { ns: 'app' })}
title={t('inbound-shipment', { ns: 'app' })}
stats={[
{
label: t('label.today', { ns: 'dashboard' }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { DraftInboundLine } from '../../../../types';
import {
CurrencyRowFragment,
getLocationInputColumn,
ItemVariantInputCell,
LocationRowFragment,
PackSizeEntryCell,
} from '@openmsupply-client/system';
Expand Down Expand Up @@ -93,6 +94,16 @@ export const QuantityTableComponent: FC<TableProps> = ({
[
getBatchColumn(updateDraftLine, theme),
getExpiryColumn(updateDraftLine, theme),

{
key: 'itemVariantId',
label: 'label.item-variant',
width: 170,
Cell: props => (
<ItemVariantInputCell {...props} itemId={props.rowData.item.id} />
),
setter: updateDraftLine,
},
[
'numberOfPacks',
{
Expand Down
4 changes: 4 additions & 0 deletions client/packages/invoices/src/InboundShipment/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const inboundParsers = {
numberOfPacks: line.numberOfPacks,
invoiceId: line.invoiceId,
location: setNullableInput('id', line.location),
itemVariantId: line.itemVariantId,
};
},
toUpdateLine: (line: DraftInboundLine): UpdateInboundShipmentLineInput => ({
Expand All @@ -118,6 +119,9 @@ const inboundParsers = {
packSize: line.packSize,
numberOfPacks: line.numberOfPacks,
location: setNullableInput('id', line.location),
itemVariantId: setNullableInput('itemVariantId', {
itemVariantId: line.itemVariantId,
}),
}),
toDeleteLine: (line: { id: string }): DeleteInboundShipmentLineInput => {
return { id: line.id };
Expand Down
Loading

0 comments on commit 957c5e2

Please sign in to comment.