Use base58 encoded uuids
This commit is contained in:
parent
1c117e302c
commit
d1275cc1e4
|
@ -19,18 +19,18 @@ export interface Params {
|
||||||
|
|
||||||
export const defaults = {
|
export const defaults = {
|
||||||
taskCategories: {
|
taskCategories: {
|
||||||
"7e92266f-0a7b-4728-8322-5fe05ff3b929": {
|
"RQ15CD3iX1Ey2f9kat7tfLGZmUx9GGc15nS6A7fYtZv76SnS4": {
|
||||||
id: "7e92266f-0a7b-4728-8322-5fe05ff3b929",
|
id: "RQ15CD3iX1Ey2f9kat7tfLGZmUx9GGc15nS6A7fYtZv76SnS4",
|
||||||
label: "Développement",
|
label: "Développement",
|
||||||
costPerTimeUnit: 500,
|
costPerTimeUnit: 500,
|
||||||
},
|
},
|
||||||
"508a0925-a664-4426-8d40-6974156f0f00": {
|
"QRdGS5Pr5si9SSjU84WAq19cjxQ3rUL71jKh8oHSMZSY4bBH9": {
|
||||||
id: "508a0925-a664-4426-8d40-6974156f0f00",
|
id: "QRdGS5Pr5si9SSjU84WAq19cjxQ3rUL71jKh8oHSMZSY4bBH9",
|
||||||
label: "Conduite de projet",
|
label: "Conduite de projet",
|
||||||
costPerTimeUnit: 500,
|
costPerTimeUnit: 500,
|
||||||
},
|
},
|
||||||
"7aab4d66-072e-4cc8-aae8-b62edd3237a8": {
|
"RPcqFMLdQrgBSomv7Sao7EQSb7on6rtjfDQK5JZNhNSg9DwEo": {
|
||||||
id: "7aab4d66-072e-4cc8-aae8-b62edd3237a8",
|
id: "RPcqFMLdQrgBSomv7Sao7EQSb7on6rtjfDQK5JZNhNSg9DwEo",
|
||||||
label: "Recette",
|
label: "Recette",
|
||||||
costPerTimeUnit: 500,
|
costPerTimeUnit: 500,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { uuidV4 } from "../util/uuid"
|
import { uuidV4, base58UUID } from "../util/uuid"
|
||||||
import { defaults } from "./params";
|
import { defaults } from "./params";
|
||||||
|
|
||||||
export type TaskID = string
|
export type TaskID = string
|
||||||
|
@ -26,7 +26,7 @@ export interface TaskCategory {
|
||||||
|
|
||||||
export function newTask(label: string, category: TaskCategoryID): Task {
|
export function newTask(label: string, category: TaskCategoryID): Task {
|
||||||
return {
|
return {
|
||||||
id: uuidV4(),
|
id: base58UUID(),
|
||||||
label,
|
label,
|
||||||
category,
|
category,
|
||||||
estimations: {
|
estimations: {
|
||||||
|
@ -39,7 +39,7 @@ export function newTask(label: string, category: TaskCategoryID): Task {
|
||||||
|
|
||||||
export function createTaskCategory(): TaskCategory {
|
export function createTaskCategory(): TaskCategory {
|
||||||
return {
|
return {
|
||||||
id: uuidV4(),
|
id: base58UUID(),
|
||||||
costPerTimeUnit: defaults.costPerTimeUnit,
|
costPerTimeUnit: defaults.costPerTimeUnit,
|
||||||
label: ""
|
label: ""
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue