Skip to content

Instantly share code, notes, and snippets.

@zourdyzou
Last active January 28, 2023 02:48
Show Gist options
  • Select an option

  • Save zourdyzou/53a4897989b1485f13e5898a5b0e25d6 to your computer and use it in GitHub Desktop.

Select an option

Save zourdyzou/53a4897989b1485f13e5898a5b0e25d6 to your computer and use it in GitHub Desktop.
πŸ’‘ The home assignment task documentation – The Bereyziat Development recruitment process for Senior React Developer position.

Mock-up link

  • To select an element in the mock-up you can click on checkbox of the first line of the table
  • To display more information about the group you can click on the first line of the table

Link: https://xd.adobe.com/view/e24cff83-0246-4982-bf63-4d8c0e4556fd-b71f/

Documentation the of the Rest API:

Groups:

Create a new group (POST)

Endpoint url: https://logifleet360.ch/lfr3/eg-services/groups

Body example:

{
    isSubGroup: true
    name: "Bordeaux"
    parentGroupId: "d90e66f8-f85d-4911-97cc-3dfdb7b53f55"
    reference: "BGD-334"
}


Response example:

[
    {
        "id": "dac488d6-f1c6-4f51-9ae6-e667883a8d22",
        "accountId": "d2d30a48-fa92-4cfb-a048-d55a93020ac7",
        "name": "St-Gall",
        "reference": null,
        "description": null,
        "rootGroup": false,
        "parentGroupId": "d2d30a48-fa92-4cfb-a048-d55a93020ac7_rootGroup",
        "parentsGroupIdsOrdered": [
            "d2d30a48-fa92-4cfb-a048-d55a93020ac7_rootGroup"
        ],
        "allChildrenIds": null
    }
]

Update Group (PUT)

Endpoint url: https://logifleet360.ch/lfr3/eg-services/groups/{group_id}

Body / Payload example:

{
    "id": "e5c21c58-2f8d-499b-a980-0be7e3f9600e",
    "accountId": "d2d30a48-fa92-4cfb-a048-d55a93020ac7",
    "name": "Theta GOP",
    "reference": "ThetaFOP-1",
    "description": null,
    "rootGroup": false,
    "parentGroupId": "d2d30a48-fa92-4cfb-a048-d55a93020ac7_rootGroup",
    "parentsGroupIdsOrdered": [
        "d2d30a48-fa92-4cfb-a048-d55a93020ac7_rootGroup"
    ],
    "allChildrenIds": []
}

Response example: None

Delete Group (DELETE)

Endpoint url: https://logifleet360.ch/lfr3/eg-services/groups

Body / Payload: An array of selected group Ids. e.g: ["1eaef24e-827f-42fe-bf62-2256027e72f9"]

Response example: None


Get groups (GET)

Group have a parent child structure.

Endpoint: https://logifleet360.ch/lfr3/eg-services/groups

Response example:

[
  {
    "id": "1eaef24e-827f-42fe-bf62-2256027e72f9",
    "accountId": "1baaeaf7-67a6-4cc1-ae28-c94683512730",
    "name": "VSL Qatar",
    "reference": "GRP-QATAR",
    "description": null,
    "rootGroup": false,
    "parentGroupId": "1baaeaf7-67a6-4cc1-ae28-c94683512730_rootGroup",
    "parentsGroupIdsOrdered": [
      "1baaeaf7-67a6-4cc1-ae28-c94683512730_rootGroup"
    ],
    "allChildrenIds": [
      "235fb8f2-cdc6-4efb-935b-3b9de2747e5c",
      "5f9dc046-6c79-4616-b28d-0a1d1f91095e"
    ]
  },
]




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment