Use base58 encoded uuids

This commit is contained in:
wpetit 2020-04-23 08:45:22 +02:00
parent 1c117e302c
commit d1275cc1e4
2 changed files with 9 additions and 9 deletions

View File

@ -19,18 +19,18 @@ export interface Params {
export const defaults = {
taskCategories: {
"7e92266f-0a7b-4728-8322-5fe05ff3b929": {
id: "7e92266f-0a7b-4728-8322-5fe05ff3b929",
"RQ15CD3iX1Ey2f9kat7tfLGZmUx9GGc15nS6A7fYtZv76SnS4": {
id: "RQ15CD3iX1Ey2f9kat7tfLGZmUx9GGc15nS6A7fYtZv76SnS4",
label: "Développement",
costPerTimeUnit: 500,
},
"508a0925-a664-4426-8d40-6974156f0f00": {
id: "508a0925-a664-4426-8d40-6974156f0f00",
"QRdGS5Pr5si9SSjU84WAq19cjxQ3rUL71jKh8oHSMZSY4bBH9": {
id: "QRdGS5Pr5si9SSjU84WAq19cjxQ3rUL71jKh8oHSMZSY4bBH9",
label: "Conduite de projet",
costPerTimeUnit: 500,
},
"7aab4d66-072e-4cc8-aae8-b62edd3237a8": {
id: "7aab4d66-072e-4cc8-aae8-b62edd3237a8",
"RPcqFMLdQrgBSomv7Sao7EQSb7on6rtjfDQK5JZNhNSg9DwEo": {
id: "RPcqFMLdQrgBSomv7Sao7EQSb7on6rtjfDQK5JZNhNSg9DwEo",
label: "Recette",
costPerTimeUnit: 500,
},

View File

@ -1,4 +1,4 @@
import { uuidV4 } from "../util/uuid"
import { uuidV4, base58UUID } from "../util/uuid"
import { defaults } from "./params";
export type TaskID = string
@ -26,7 +26,7 @@ export interface TaskCategory {
export function newTask(label: string, category: TaskCategoryID): Task {
return {
id: uuidV4(),
id: base58UUID(),
label,
category,
estimations: {
@ -39,7 +39,7 @@ export function newTask(label: string, category: TaskCategoryID): Task {
export function createTaskCategory(): TaskCategory {
return {
id: uuidV4(),
id: base58UUID(),
costPerTimeUnit: defaults.costPerTimeUnit,
label: ""
};