From 0750d7d6e8646b645afdac8ebd6318a834c21507 Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 12:02:27 -0800 Subject: [PATCH 01/20] chore: Add sponsors section to README --- README.md | 6 ++++++ screenshots/become-a-sponsor.png | Bin 0 -> 1922 bytes 2 files changed, 6 insertions(+) create mode 100644 screenshots/become-a-sponsor.png diff --git a/README.md b/README.md index a4f77c7321..62a100920f 100644 --- a/README.md +++ b/README.md @@ -117,3 +117,9 @@ Not sure where to start? [Send us an email](mailto:dev@karrio.com?subject=Pairin This project uses the [Apache v2 license](LICENSE). The core Karrio platform will always remain open and free. Any other questions, mail us at hello@karrio.io We’d love to meet you! + +## Sponsors + +We are building an open and global shipping platform that makes shipping integration and logistics automation fun and accessible using and building on top of open source software. Thanks to these sponsors who are backing this initiative. + +New Sponsor diff --git a/screenshots/become-a-sponsor.png b/screenshots/become-a-sponsor.png new file mode 100644 index 0000000000000000000000000000000000000000..ba506331470f1173a3e9480533155630351328b4 GIT binary patch literal 1922 zcmcIlX*3&%77mJt@~jg}YqW@3szoPJi7IUgAzE5%N<*m`(TpZEA+1UoT5FC8IvPeX zof-R5r8HtmqjoXGGO8#hmSpUNjFG002exzex)4!*eZ(QHtQ{>~h)RI!S7k0mpf{Xnejd> zOIIcHDFp2-MLnGmT$G^ftEZ%4sf0{Prg0x-sp+W5y1poJc@fT=MsnbBAuVVqhj#DK zqqb7m%OHgHA8b@t5xjuWrgYaPwD5#QVizPmvKixtmsLaND zTF_nRMQc2xXsmc>WaI|Ou~(+dr%E}=vFLhvtBL%H1=Vvmjyl@tV->)L<}=hpBTQCx zqM};Pw+`)U7D(TASp`(%|G}A5dLlV3EiIABWRf-)cGu>LFc!%zG!&L$6Lk_n**!~? zJ~*nZ{LcB*!V?T=S-iiq*5&4DN~eNfyB)fJLqS?9qOGcVZyqZ!J&f7M;{Ug8C1o6(Bja%9X_=X@e%RgLwK`{iGH8EuUl`a(-dJemq6-k( zLBUbnq0%hl`KiVz1KiY`uR!U~+|1FoA|Ko4`@)PK{Y?LZO}>|bc=9!VMljWE8F~1Z zc!rfAliniP+IO7HFFB>eY374;#O3#HNNt=RJf^&+^Q3<#$`2Pp82Rk>YmSl+)FE|+)H6$+mvA*neK-z=NjX1yXQ04tNYbr+`-iu29i^z;_Kn4X z4i@WT`M*}@?B-Q_*{R@=eYeE=?0fa}?U3Q6boYsHCdq?QlN!#=8+2O1MyyV}vV{Dm z3*TL*WGw9nr{T>SR>AIuF}Ht`b}}#+a5_ak_KYmr-=B+H*N$v?i9ngnld+RHsXC2C z%;O44I!>q!es{D8lWUCc-+-0-X`mrlj+cf0kxRQW$fCaEe#4to!wzCiVhRG2wbrubCUSn>Ja)o! z+Pg4JRc&j|wyf;*HE;W|Cc>Q+3}upA*oS(pkdr%_FIu+>N-6M7U@I1;3~>7%zPvy? z)3xLKg^f;uKniGj{C1p-lc860-`!rVhIr{pc_*tqziS6z2y~+_jV3O63g|LsM7Z_( zH7Z+-4qxxm%lhEPryr7Myt3j(o;yc$JBcf?>PtJvP zpmbX`4SmPT^nINws(@bH5y@xiQJ*UTrD{C;onRM+{nT1p{y^B4javaryugz%EA`OH zyOGuIjeGbU9%$*_@@T~=2<2J1 zE>Qd*Jf+Vd^j|REF)B7T)(~i!sgcSqnq{$ALUna@hm^fp2_nT?@CAZOcXxMj?L)DM z`&846szL}Q63-zXi0Vaq8;jGR9N%BAcLy}!{(dZ7A3xrDRatB*Jd|@;WD^G8G-*m+ PCcxzi`f{b?E$Y7k*M^K2 literal 0 HcmV?d00001 From 2a4f1ee9a7f0f1fa5345a17c9528c345763951bd Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 12:46:27 -0800 Subject: [PATCH 02/20] fix: Easypost Fee parsing issue --- .../providers/easypost/shipment/create.py | 3 +- .../easypost/tests/easypost/test_shipment.py | 308 ++++++++++++++++++ 2 files changed, 310 insertions(+), 1 deletion(-) diff --git a/modules/connectors/easypost/karrio/providers/easypost/shipment/create.py b/modules/connectors/easypost/karrio/providers/easypost/shipment/create.py index ed00ce0723..c67dc82de9 100644 --- a/modules/connectors/easypost/karrio/providers/easypost/shipment/create.py +++ b/modules/connectors/easypost/karrio/providers/easypost/shipment/create.py @@ -14,6 +14,7 @@ def parse_shipment_response( _response: lib.Deserializable[dict], settings: provider_utils.Settings, ) -> typing.Tuple[models.ShipmentDetails, typing.List[models.Message]]: + print(_response.value) response = _response.deserialize() errors = provider_error.parse_error_response(response, settings) shipment = _extract_details(response, settings) if "error" not in response else None @@ -40,7 +41,7 @@ def _extract_details( rate_provider=shipment.selected_rate.carrier, service_name=shipment.selected_rate.service, label_url=shipment.postage_label.label_url, - fees=shipment.fees, + fees=lib.to_dict(shipment.fees or []), ), ) diff --git a/modules/connectors/easypost/tests/easypost/test_shipment.py b/modules/connectors/easypost/tests/easypost/test_shipment.py index a4a3017b3b..d5a9bb3355 100644 --- a/modules/connectors/easypost/tests/easypost/test_shipment.py +++ b/modules/connectors/easypost/tests/easypost/test_shipment.py @@ -73,6 +73,19 @@ def test_parse_cancel_shipment_response(self): DP.to_dict(parsed_response), ParsedCancelShipmentResponse ) + def test_parse_shipment_with_fee_response(self): + with patch("karrio.mappers.easypost.proxy.lib.request") as mocks: + mocks.side_effect = [ShipmentResponseJSON, ShipmentResponseWithFeeJSON] + response = Shipment.create(self.ShipmentRequest).from_(gateway) + + with patch("karrio.providers.easypost.utils.request") as mock: + mock.return_value = "" + parsed_response = response.parse() + + self.assertListEqual( + DP.to_dict(parsed_response), ParsedShipmentWithFeeResponse + ) + if __name__ == "__main__": unittest.main() @@ -135,6 +148,45 @@ def test_parse_cancel_shipment_response(self): [], ] +ParsedShipmentWithFeeResponse = [ + { + "carrier_id": "easypost", + "carrier_name": "easypost", + "docs": {}, + "label_type": "PDF", + "meta": { + "carrier_tracking_link": "https://track.easypost.com/djE6dHJrXzM3NGZjYzI5MTVkNjRmOGU4N2Y5NTQyNmRhMTkzYzBk", + "fees": [ + { + "amount": "0.00000", + "charged": True, + "object": "Fee", + "refunded": False, + "type": "LabelFee", + } + ], + "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20231228/e87613ef189ad041d092d5931a615391fc.pdf", + "rate_provider": "AustraliaPost", + "service_name": "ParcelPostSignature", + }, + "shipment_identifier": "shp_00814fe0264b485b9d9cf7064d43a904", + "tracking_number": "34UNM501285701000931508", + }, + [ + { + "carrier_id": "easypost", + "carrier_name": "easypost", + "code": "rate_error", + "details": { + "carrier": "Toll", + "carrier_account_id": "ca_e36cbf9072434ef3966e1d324b70f835", + }, + "message": "business_unit='Priority' is currently not supported, only " + "{'IPEC'}", + } + ], +] + ShipmentRequestJSON = { "insurance": 249.99, @@ -540,3 +592,259 @@ def test_parse_cancel_shipment_response(self): "updated_at": "2013-11-08T20:58:26Z" } """ + +ShipmentResponseWithFeeJSON = """{ + "created_at": "2023-12-28T06:18:57Z", + "is_return": false, + "messages": [ + { + "carrier": "Toll", + "carrier_account_id": "ca_e36cbf9072434ef3966e1d324b70f835", + "type": "rate_error", + "message": "business_unit='Priority' is currently not supported, only {'IPEC'}" + } + ], + "mode": "production", + "options": { + "label_date": "2023-12-28T00:00:00+00:00", + "label_format": "PDF", + "payment": { + "country": "AU", + "postal_code": "6155", + "type": "SENDER" + }, + "currency": "USD", + "date_advance": 0 + }, + "reference": null, + "status": "unknown", + "tracking_code": "34UNM501285701000931508", + "updated_at": "2023-12-28T06:19:02Z", + "batch_id": null, + "batch_status": null, + "batch_message": null, + "customs_info": null, + "from_address": { + "id": "adr_fc07a3b5a54811ee9209ac1f6bc539ae", + "object": "Address", + "created_at": "2023-12-28T06:18:57+00:00", + "updated_at": "2023-12-28T06:18:57+00:00", + "name": "Tester", + "company": null, + "street1": "7-13 Bell St", + "street2": null, + "city": "Canning Vale", + "state": "WA", + "zip": "6155", + "country": "AU", + "phone": "61401595496", + "email": "test@user.com.au", + "mode": "production", + "carrier_facility": null, + "residential": false, + "federal_tax_id": null, + "state_tax_id": null, + "verifications": {} + }, + "insurance": null, + "order_id": null, + "parcel": { + "id": "prcl_dbb0a34440c24831bcbe61d35f1d9fd5", + "object": "Parcel", + "created_at": "2023-12-28T06:18:57Z", + "updated_at": "2023-12-28T06:18:57Z", + "length": 6.02, + "width": 3.94, + "height": 1.97, + "predefined_package": null, + "weight": 229.28, + "mode": "production" + }, + "postage_label": { + "object": "PostageLabel", + "id": "pl_371c57a639ed4886a01362e57b0dd394", + "created_at": "2023-12-28T06:19:02Z", + "updated_at": "2023-12-28T06:19:02Z", + "date_advance": 0, + "integrated_form": "none", + "label_date": "2023-12-28T06:19:02Z", + "label_resolution": 200, + "label_size": "4x6", + "label_type": "default", + "label_file_type": "application/pdf", + "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20231228/e87613ef189ad041d092d5931a615391fc.pdf", + "label_pdf_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20231228/e87613ef189ad041d092d5931a615391fc.pdf", + "label_zpl_url": null, + "label_epl2_url": null, + "label_file": null + }, + "rates": [ + { + "id": "rate_fdbea47d5d7f497898bf1e93414d1818", + "object": "Rate", + "created_at": "2023-12-28T06:18:58Z", + "updated_at": "2023-12-28T06:18:58Z", + "mode": "production", + "service": "ParcelPostSignature", + "carrier": "AustraliaPost", + "rate": "7.50", + "currency": "AUD", + "retail_rate": null, + "retail_currency": null, + "list_rate": null, + "list_currency": null, + "billing_type": "carrier", + "delivery_days": 4, + "delivery_date": null, + "delivery_date_guaranteed": null, + "est_delivery_days": 4, + "shipment_id": "shp_00814fe0264b485b9d9cf7064d43a904", + "carrier_account_id": "ca_3775938b95ba414aa4917482f44c7022" + }, + { + "id": "rate_2c392ee0603345f0a87f429a9172e649", + "object": "Rate", + "created_at": "2023-12-28T06:18:58Z", + "updated_at": "2023-12-28T06:18:58Z", + "mode": "production", + "service": "ExpressPostSignature", + "carrier": "AustraliaPost", + "rate": "10.13", + "currency": "AUD", + "retail_rate": null, + "retail_currency": null, + "list_rate": null, + "list_currency": null, + "billing_type": "carrier", + "delivery_days": 1, + "delivery_date": null, + "delivery_date_guaranteed": null, + "est_delivery_days": 1, + "shipment_id": "shp_00814fe0264b485b9d9cf7064d43a904", + "carrier_account_id": "ca_3775938b95ba414aa4917482f44c7022" + } + ], + "refund_status": null, + "scan_form": null, + "selected_rate": { + "id": "rate_fdbea47d5d7f497898bf1e93414d1818", + "object": "Rate", + "created_at": "2023-12-28T06:19:02Z", + "updated_at": "2023-12-28T06:19:02Z", + "mode": "production", + "service": "ParcelPostSignature", + "carrier": "AustraliaPost", + "rate": "7.50", + "currency": "AUD", + "retail_rate": null, + "retail_currency": null, + "list_rate": null, + "list_currency": null, + "billing_type": "carrier", + "delivery_days": 4, + "delivery_date": null, + "delivery_date_guaranteed": null, + "est_delivery_days": 4, + "shipment_id": "shp_00814fe0264b485b9d9cf7064d43a904", + "carrier_account_id": "ca_3775938b95ba414aa4917482f44c7022" + }, + "tracker": { + "id": "trk_374fcc2915d64f8e87f95426da193c0d", + "object": "Tracker", + "mode": "production", + "tracking_code": "34UNM501285701000931508", + "status": "unknown", + "status_detail": "unknown", + "created_at": "2023-12-28T06:19:02Z", + "updated_at": "2023-12-28T06:19:02Z", + "signed_by": null, + "weight": null, + "est_delivery_date": null, + "shipment_id": "shp_00814fe0264b485b9d9cf7064d43a904", + "carrier": "AustraliaPost", + "tracking_details": [], + "fees": [], + "carrier_detail": null, + "public_url": "https://track.easypost.com/djE6dHJrXzM3NGZjYzI5MTVkNjRmOGU4N2Y5NTQyNmRhMTkzYzBk" + }, + "to_address": { + "id": "adr_fc052c99a54811ee9207ac1f6bc539ae", + "object": "Address", + "created_at": "2023-12-28T06:18:57+00:00", + "updated_at": "2023-12-28T06:18:57+00:00", + "name": "Test recipient", + "company": null, + "street1": "1 Dempsey Rd", + "street2": null, + "city": "Piara Waters", + "state": "WA", + "zip": "6112", + "country": "AU", + "phone": null, + "email": "test@gmail.com", + "mode": "production", + "carrier_facility": null, + "residential": true, + "federal_tax_id": null, + "state_tax_id": null, + "verifications": {} + }, + "usps_zone": 2, + "return_address": { + "id": "adr_fc07a3b5a54811ee9209ac1f6bc539ae", + "object": "Address", + "created_at": "2023-12-28T06:18:57+00:00", + "updated_at": "2023-12-28T06:18:57+00:00", + "name": "Shipr", + "company": null, + "street1": "7-13 Bell St", + "street2": null, + "city": "Canning Vale", + "state": "WA", + "zip": "6155", + "country": "AU", + "phone": "61401595496", + "email": "test@mail.com.au", + "mode": "production", + "carrier_facility": null, + "residential": false, + "federal_tax_id": null, + "state_tax_id": null, + "verifications": {} + }, + "buyer_address": { + "id": "adr_fc052c99a54811ee9207ac1f6bc539ae", + "object": "Address", + "created_at": "2023-12-28T06:18:57+00:00", + "updated_at": "2023-12-28T06:18:57+00:00", + "name": "Test recipient", + "company": null, + "street1": "1 Dempsey Rd", + "street2": null, + "city": "Piara Waters", + "state": "WA", + "zip": "6112", + "country": "AU", + "phone": null, + "email": "test@gmail.com", + "mode": "production", + "carrier_facility": null, + "residential": true, + "federal_tax_id": null, + "state_tax_id": null, + "verifications": {} + }, + "forms": [], + "fees": [ + { + "object": "Fee", + "type": "LabelFee", + "amount": "0.00000", + "charged": true, + "refunded": false + } + ], + "id": "shp_00814fe0264b485b9d9cf7064d43a904", + "object": "Shipment" +} +""" From 29cbeed679eb3f7f4354b17d4e505b2f647f51a9 Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 12:47:04 -0800 Subject: [PATCH 03/20] feat: Add omitted customs cancel request options --- .../manager/karrio/server/manager/serializers/shipment.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/manager/karrio/server/manager/serializers/shipment.py b/modules/manager/karrio/server/manager/serializers/shipment.py index dfe50fd0a4..cedc46f00b 100644 --- a/modules/manager/karrio/server/manager/serializers/shipment.py +++ b/modules/manager/karrio/server/manager/serializers/shipment.py @@ -384,7 +384,11 @@ def update( gateway.Shipments.cancel( payload={ **ShipmentCancelRequest(instance).data, - "options": {**instance.options, **instance.meta} + "options": { + **instance.options, + **instance.meta, + **(validated_data.get("options") or {}), + }, }, carrier=instance.selected_rate_carrier, ) From 6fb749918e3d690b98a0ba7caf275d0bac0fdb7d Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 12:59:34 -0800 Subject: [PATCH 04/20] docs: Fix grammartical and sentence structure errors in the OpenAPI schema page --- .../core/karrio/server/core/views/schema.py | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/modules/core/karrio/server/core/views/schema.py b/modules/core/karrio/server/core/views/schema.py index fa97b768c9..c6cc179067 100644 --- a/modules/core/karrio/server/core/views/schema.py +++ b/modules/core/karrio/server/core/views/schema.py @@ -55,7 +55,7 @@ def render_schema_description(APP_NAME): return f""" ## API Reference -{APP_NAME} is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. +{APP_NAME} is an open source multi-carrier shipping API that simplifies the integration of logistics carrier services. The {APP_NAME} API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. @@ -69,7 +69,7 @@ def render_schema_description(APP_NAME): When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `{VERSION}`. -Read our API changelog and to learn more about backwards compatibility. +Read our API changelog to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. @@ -106,7 +106,7 @@ def render_schema_description(APP_NAME): ## Metadata -Updateable {APP_NAME} objects—including Shipment and Order—have a metadata parameter. +Updateable {APP_NAME} objects—including Shipment and Order have a metadata parameter. You can use this parameter to attach key-value data to these {APP_NAME} objects. Metadata is useful for storing additional, structured information on an object. @@ -201,14 +201,14 @@ def render_tags(request, APP_NAME): }, { "name": "Carriers", - "description": f"""This is an object representing your a {APP_NAME} carrier account connectsions. + "description": f"""This is an object representing your {APP_NAME} carrier account connectsions. You can retrieve all configured connections available to your {APP_NAME} account. The `carrier_id` is a nickname you assign to your connection. """, }, { "name": "Addresses", - "description": f"""This is an object representing your a {APP_NAME} shipping address. + "description": f"""This is an object representing your {APP_NAME} shipping address. You can retrieve all addresses related to your {APP_NAME} account. Address objects are linked to your shipment history, and can be used for recurring shipping to / from the same locations. @@ -216,20 +216,20 @@ def render_tags(request, APP_NAME): }, { "name": "Parcels", - "description": f"""This is an object representing your a {APP_NAME} shipping parcel. + "description": f"""This is an object representing your {APP_NAME} shipping parcel. Parcel objects are linked to your shipment history, and can be used for recurring shipping using the same packaging. """, }, { "name": "Customs", - "description": f"""This is an object representing your a {APP_NAME} shipping customs declaration. + "description": f"""This is an object representing your {APP_NAME} shipping customs declaration. You can retrieve all customs declarations used historically with your {APP_NAME} account shipments. """, }, { "name": "Shipments", - "description": f"""This is an object representing your a {APP_NAME} shipment. + "description": f"""This is an object representing your {APP_NAME} shipment. A Shipment guides you through process of preparing and purchasing a label for an order. A Shipment transitions through multiple statuses throughout its lifetime as the package shipped makes its journey to it's destination. @@ -237,21 +237,21 @@ def render_tags(request, APP_NAME): }, { "name": "Documents", - "description": f"""This is an object representing your a {APP_NAME} document upload record. + "description": f"""This is an object representing your {APP_NAME} document upload record. A Document upload record keep traces of shipping trade documents uploaded to carriers - to fast track customs processing. + to fast track customs and border processing. """, }, { "name": "Trackers", - "description": f"""This is an object representing your a {APP_NAME} shipment tracker. + "description": f"""This is an object representing your {APP_NAME} shipment tracker. A shipment tracker is an object attached to a shipment by it's tracking number. The tracker provide the latest tracking status and events associated with a shipment """, }, { "name": "Pickups", - "description": f"""This is an object representing your a {APP_NAME} pickup booking. + "description": f"""This is an object representing your {APP_NAME} pickup booking. You can retrieve all pickup booked historically for your {APP_NAME} account shipments. """, }, @@ -262,24 +262,25 @@ def render_tags(request, APP_NAME): validate your request and simply forward it to the shipping carrier server.
**Note:**
When using the proxy API, no objects are created in the {APP_NAME} system. + excpet API logs and tracing records for debugging purposes. """, }, { "name": "Orders", - "description": f"""This is an object representing your a {APP_NAME} order. + "description": f"""This is an object representing your {APP_NAME} order. You can create {APP_NAME} orders to organize your shipments and ship line items separately. """, }, { "name": "Webhooks", - "description": f"""This is an object representing your a {APP_NAME} webhook. - You can configure webhook endpoints via the API to be notified about events that happen in your + "description": f"""This is an object representing your {APP_NAME} webhook. + You can configure webhook endpoints via the API to be notified about events happen in your {APP_NAME} account. """, }, { "name": "Batches", - "description": f"""This is an object representing your a {APP_NAME} batch operation. + "description": f"""This is an object representing your {APP_NAME} batch operation. You can retrieve all batch operations historically for your {APP_NAME} account. """, }, From 074043d43715849b843d37861bdc48f6f64deeab Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 13:28:03 -0800 Subject: [PATCH 05/20] fix: margin gap for administration sidebar on mobile --- apps/dashboard/src/styles/dashboard.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dashboard/src/styles/dashboard.scss b/apps/dashboard/src/styles/dashboard.scss index 2e1795b015..7680736816 100644 --- a/apps/dashboard/src/styles/dashboard.scss +++ b/apps/dashboard/src/styles/dashboard.scss @@ -666,6 +666,7 @@ pre.code { .admin-sidebar-menu { height: calc(100%); + margin: 0 !important; } .sidebar-menu-button.is-mobile-active { From 8636065474046cb047e862466035d355da9b61f7 Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 13:29:03 -0800 Subject: [PATCH 06/20] feat: make modals to be fullscreen on mobile --- apps/dashboard/src/styles/theme.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dashboard/src/styles/theme.scss b/apps/dashboard/src/styles/theme.scss index ef4947fdf7..386b7c5f5a 100644 --- a/apps/dashboard/src/styles/theme.scss +++ b/apps/dashboard/src/styles/theme.scss @@ -85,6 +85,8 @@ $footer-background-color: $white; .is-medium-modal { width: 100vw; height: 100vh; + max-width: 100vw; + max-height: 100vh; } } From 8ec41061da721ccfeac51163dd1756260abaca3f Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 13:29:58 -0800 Subject: [PATCH 07/20] fix: Sliding pagination for staff user list on mobile --- packages/ui/admin/staff-management.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/ui/admin/staff-management.tsx b/packages/ui/admin/staff-management.tsx index 8f530796ab..3d3dcb108a 100644 --- a/packages/ui/admin/staff-management.tsx +++ b/packages/ui/admin/staff-management.tsx @@ -107,22 +107,22 @@ export const StaffManagement: React.FC = () => { + -
+
-
- {(users?.edges || []).length} results +
+ {(users?.edges || []).length} results -
- - -
-
- +
+ + +
+
From de2daaa23d57ff021c4aaeb1e2ceb6232ee27c7a Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 13:30:41 -0800 Subject: [PATCH 08/20] feat: Improve name input dropdown items look and feel --- packages/ui/components/name-input.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ui/components/name-input.tsx b/packages/ui/components/name-input.tsx index b12d43fef7..e59d571ccc 100644 --- a/packages/ui/components/name-input.tsx +++ b/packages/ui/components/name-input.tsx @@ -1,9 +1,9 @@ -import { InputField, InputFieldComponent } from './input-field'; import { useAddressTemplates } from '@karrio/hooks/address'; -import { formatAddress, isNone } from '@karrio/lib'; -import { AddressType } from '@karrio/types'; import React, { ChangeEvent, RefObject } from 'react'; +import { formatAddress, isNone } from '@karrio/lib'; +import { InputFieldComponent } from './input-field'; import { Combobox } from '@headlessui/react'; +import { AddressType } from '@karrio/types'; interface NameInputComponent extends InputFieldComponent { onValueChange: (value: Partial, refresh?: boolean) => void; @@ -71,7 +71,9 @@ export const NameInput: React.FC = ({ disableSuggestion, val className={'dropdown-item is-clickable'} value={template.address} > - {template.label} - {formatAddress(template?.address as any)} + + {template.label} - {formatAddress(template?.address as any)} + ))} From 71194c8bf7840e7113d8a50bd7b62d27a70c2829 Mon Sep 17 00:00:00 2001 From: Daniel K Date: Fri, 29 Dec 2023 13:36:03 -0800 Subject: [PATCH 09/20] feat: Make workflow list responsive --- apps/dashboard/src/modules/Workflows/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/modules/Workflows/index.tsx b/apps/dashboard/src/modules/Workflows/index.tsx index dbec2ecfb2..258703da92 100644 --- a/apps/dashboard/src/modules/Workflows/index.tsx +++ b/apps/dashboard/src/modules/Workflows/index.tsx @@ -58,10 +58,10 @@ export default function Page(pageProps: any) {