Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 1.7 KB

USAGE.md

File metadata and controls

75 lines (54 loc) · 1.7 KB

Usage

Data structure of json files in src/modals

id type description
title string title of OKRs
objectives array<hash> all objectives

One of objectives

id type description
name string name of this objective
okrs array<string> labels of this objective
weight number weight of this objective
results array<hash> key results of this objective

One of results

id type description
name string name of this key result
description string description of this key result
progress number or array<hash> progress of this key result
weight number weight of this key result
score null or string score of this key result
scoring array<hash> scoring option of this key result
One of process
type description
key string name of this process
value number degree of completion of this process
One of scoring
type description
key string score of this scoring option
value string description of this scoring option

Add json file of new OKRs

For example:

Write a json file of new OKRs with name 201803.json in src/modals

// modify src/components/Okrs.js

// ... some code

import okrs201803 from '../modals/okrs.json'; // add this line

// ... some code

switch (match.params.quarter) {
    case 'index':
      okrs = defaultOkrs;
      break;

    // add 3 lines below
    case '201803':
      okrs = okrs201803;
      break;

    default:
      okrs = defaultOkrs;
      break;
}

// ... some code