{"id":16982852,"url":"https://github.com/teplostanski/services-tree--test-task","last_synced_at":"2026-02-28T09:30:14.471Z","repository":{"id":221887934,"uuid":"755681275","full_name":"teplostanski/services-tree--test-task","owner":"teplostanski","description":null,"archived":true,"fork":false,"pushed_at":"2024-02-10T20:22:07.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T18:44:40.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://teplostanski.github.io/services-tree--test-task/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teplostanski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-10T19:56:19.000Z","updated_at":"2024-11-28T07:56:00.000Z","dependencies_parsed_at":"2024-02-10T20:48:38.610Z","dependency_job_id":null,"html_url":"https://github.com/teplostanski/services-tree--test-task","commit_stats":null,"previous_names":["teplostanski/services-tree--test-task"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teplostanski%2Fservices-tree--test-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teplostanski%2Fservices-tree--test-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teplostanski%2Fservices-tree--test-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teplostanski%2Fservices-tree--test-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teplostanski","download_url":"https://codeload.github.com/teplostanski/services-tree--test-task/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239872592,"owners_count":19711097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T02:26:21.524Z","updated_at":"2026-02-28T09:30:14.365Z","avatar_url":"https://github.com/teplostanski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"***Демо*** https://teplostanski.github.io/services-tree--test-task/\n\n**Тестовое задание (Js разработчик):**\n\nПостроить и вывести в виде web-страницы дерева n-ой вложенности. Референс дерева подобно дереву директорий проводника Windows (каждый следующий слой смещать вправо)\n\n![img](./img.png)\n\nСостав строк: название (стоимость)\n\nДанные: Приходит по rest api стек данных в формате json.\n\nОписание состава данных:\n```json\n{\n  \"services\": [\n    {\n      \"id\": int,\n\n      \"head\": int,\n\n      \"name\": str,\n\n      \"node\": int,\n\n      \"price\": float,\n\n      \"sorthead\": int\n    }\n  ]\n}\n```\nhead = id вышележащего узла (null означает, что услуга находится в корневом узле)\n\nnode = флаг \"узел дерева\" (1-узел, 0-лист)\n\nВ рамках одного слоя нужно выводить строки в порядке возрастания показателя sorthead.\n\nДля проверки использовать пример ответа api:\n\n```json\n{\n  \"services\": [\n    {\n      \"id\": 1,\n      \"head\": null,\n      \"name\": \"Проф.осмотр\",\n      \"node\": 0,\n      \"price\": 100.0,\n      \"sorthead\": 20\n    },\n    {\n      \"id\": 2,\n      \"head\": null,\n      \"name\": \"Хирургия\",\n      \"node\": 1,\n      \"price\": 0.0,\n      \"sorthead\": 10\n    },\n    {\n      \"id\": 3,\n      \"head\": 2,\n      \"name\": \"Удаление зубов\",\n      \"node\": 1,\n      \"price\": 0.0,\n      \"sorthead\": 10\n    },\n    {\n      \"id\": 4,\n      \"head\": 3,\n      \"name\": \"Удаление зуба\",\n      \"node\": 0,\n      \"price\": 800.0,\n      \"sorthead\": 10\n    },\n    {\n      \"id\": 5,\n      \"head\": 3,\n      \"name\": \"Удаление 8ого зуба\",\n      \"node\": 0,\n      \"price\": 1000.0,\n      \"sorthead\": 30\n    },\n    {\n      \"id\": 6,\n      \"head\": 3,\n      \"name\": \"Удаление осколка зуба\",\n      \"node\": 0,\n      \"price\": 2000.0,\n      \"sorthead\": 20\n    },\n    {\n      \"id\": 7,\n      \"head\": 2,\n      \"name\": \"Хирургические вмешательство\",\n      \"node\": 0,\n      \"price\": 200.0,\n      \"sorthead\": 10\n    },\n    {\n      \"id\": 8,\n      \"head\": 2,\n      \"name\": \"Имплантация зубов\",\n      \"node\": 1,\n      \"price\": 0.0,\n      \"sorthead\": 20\n    },\n    {\n      \"id\": 9,\n      \"head\": 8,\n      \"name\": \"Коронка\",\n      \"node\": 0,\n      \"price\": 3000.0,\n      \"sorthead\": 10\n    },\n    {\n      \"id\": 10,\n      \"head\": 8,\n      \"name\": \"Слепок челюсти\",\n      \"node\": 0,\n      \"price\": 500.0,\n      \"sorthead\": 20\n    }\n  ]\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteplostanski%2Fservices-tree--test-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteplostanski%2Fservices-tree--test-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteplostanski%2Fservices-tree--test-task/lists"}