feature(map): move locked static challenges to seed files
This commit is contained in:
@ -1,68 +0,0 @@
|
|||||||
import React, { PropTypes } from 'react';
|
|
||||||
import PureComponent from 'react-pure-render/component';
|
|
||||||
import dedent from 'dedent';
|
|
||||||
import SuperBlock from './Super-Block.jsx';
|
|
||||||
|
|
||||||
const lockMessage = dedent`
|
|
||||||
To qualify for these nonprofit projects,
|
|
||||||
you must first earn all three foundational certifications:
|
|
||||||
Front End, Data Visualization, and Back End
|
|
||||||
`.replace(/[\n]/g, ' ');
|
|
||||||
|
|
||||||
const codingPrep = [{
|
|
||||||
title: 'Coding Interview Training',
|
|
||||||
time: '70 Hours',
|
|
||||||
challenges: [
|
|
||||||
{
|
|
||||||
title: 'Soft Skill Training',
|
|
||||||
isLocked: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Critical Thinking Training',
|
|
||||||
isLocked: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Whiteboard Coding Training',
|
|
||||||
isLocked: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'Mock Interviews',
|
|
||||||
time: '10 Hours',
|
|
||||||
challenges: [
|
|
||||||
{
|
|
||||||
title: 'Mock Interview #1',
|
|
||||||
isLocked: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Mock Interview #2',
|
|
||||||
isLocked: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Mock Interview #3',
|
|
||||||
isLocked: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}];
|
|
||||||
const title = 'Coding Interview Prep';
|
|
||||||
const dashedName = 'coding-prep';
|
|
||||||
export default class CodingPrep extends PureComponent {
|
|
||||||
static displayName = 'CodingPrep;'
|
|
||||||
static propTypes = {
|
|
||||||
mapUi: PropTypes.object,
|
|
||||||
toggleThisPanel: PropTypes.func
|
|
||||||
};
|
|
||||||
render() {
|
|
||||||
const { mapUi, toggleThisPanel } = this.props;
|
|
||||||
return (
|
|
||||||
<SuperBlock
|
|
||||||
blocks={ codingPrep }
|
|
||||||
dashedName={ dashedName }
|
|
||||||
mapUi={ mapUi }
|
|
||||||
message={ lockMessage }
|
|
||||||
title={ title }
|
|
||||||
toggleThisPanel={ toggleThisPanel }
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
import React, { PropTypes } from 'react';
|
|
||||||
import PureComponent from 'react-pure-render/component';
|
|
||||||
import dedent from 'dedent';
|
|
||||||
import SuperBlock from './Super-Block.jsx';
|
|
||||||
|
|
||||||
const lockMessage = dedent`
|
|
||||||
To qualify for these nonprofit projects,
|
|
||||||
you must first earn all three foundational certifications:
|
|
||||||
Front End, Data Visualization, and Back End
|
|
||||||
`.replace(/[\n]/g, ' ');
|
|
||||||
|
|
||||||
const nonprofitProjects = {
|
|
||||||
title: 'Nonprofit Projects',
|
|
||||||
time: '800 Hours',
|
|
||||||
challenges: [
|
|
||||||
{
|
|
||||||
title: 'Greenfield Nonprofit Project #1',
|
|
||||||
dashedName: 'greenfield-1',
|
|
||||||
isLocked: true,
|
|
||||||
isRequired: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Greenfield Nonprofit Project #2',
|
|
||||||
dashedName: 'greenfield-2',
|
|
||||||
isLocked: true,
|
|
||||||
isRequired: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Legacy Code Nonprofit Project #1',
|
|
||||||
dashedName: 'legacy-1',
|
|
||||||
isLocked: true,
|
|
||||||
isRequired: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Legacy Code Nonprofit Project #2',
|
|
||||||
dashedName: 'legacy-2',
|
|
||||||
isLocked: true,
|
|
||||||
isRequired: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Claim your Full Stack Development Certification',
|
|
||||||
dashedName: 'claim-full-stack',
|
|
||||||
isLocked: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
const title = 'Full Stack Development Certification';
|
|
||||||
const dashedName = 'full-stack';
|
|
||||||
export default class FullStack extends PureComponent {
|
|
||||||
static displayName = 'FullStack';
|
|
||||||
static propTypes = {
|
|
||||||
mapUi: PropTypes.object,
|
|
||||||
toggleThisPanel: PropTypes.func
|
|
||||||
};
|
|
||||||
render() {
|
|
||||||
const { mapUi, toggleThisPanel } = this.props;
|
|
||||||
return (
|
|
||||||
<SuperBlock
|
|
||||||
blocks={ [ nonprofitProjects ] }
|
|
||||||
dashedName={ dashedName }
|
|
||||||
mapUi={ mapUi }
|
|
||||||
message={ lockMessage }
|
|
||||||
title={ title }
|
|
||||||
toggleThisPanel={ toggleThisPanel }
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "Nonprofit Projects",
|
||||||
|
"order": 22,
|
||||||
|
"time": "800 Hours",
|
||||||
|
"isLocked": true,
|
||||||
|
"message": "To qualify for these nonprofit projects, you must first earn all three foundational certifications: Front End, Data Visualization, and Back End",
|
||||||
|
"challenges": [
|
||||||
|
{
|
||||||
|
"title": "Greenfield Nonprofit Project #1",
|
||||||
|
"isRequired": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Greenfield Nonprofit Project #2",
|
||||||
|
"isRequired": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Legacy Code Nonprofit Project #1",
|
||||||
|
"isRequired": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Legacy Code Nonprofit Project #2",
|
||||||
|
"isRequired": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Claim your Full Stack Development Certification"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "Coding Interview Training",
|
||||||
|
"order": 23,
|
||||||
|
"time": "70 Hours",
|
||||||
|
"isLocked": true,
|
||||||
|
"message": "To qualify for these nonprofit projects, you must first earn all three foundational certifications: Front End, Data Visualization, and Back End",
|
||||||
|
"challenges": [
|
||||||
|
{
|
||||||
|
"title": "Soft Skill Training"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Critical Thinking Training"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Whiteboard Coding Training"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "Mock Interviews",
|
||||||
|
"order": 24,
|
||||||
|
"time": "10 Hours",
|
||||||
|
"isLocked": true,
|
||||||
|
"message": "To qualify for these nonprofit projects, you must first earn all three foundational certifications: Front End, Data Visualization, and Back End",
|
||||||
|
"challenges": [
|
||||||
|
{
|
||||||
|
"title": "Mock Interview #1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Mock Interview #2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Mock Interview #3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -40,6 +40,8 @@ Observable.combineLatest(
|
|||||||
var fileName = challengeSpec.fileName;
|
var fileName = challengeSpec.fileName;
|
||||||
var helpRoom = challengeSpec.helpRoom || 'Help';
|
var helpRoom = challengeSpec.helpRoom || 'Help';
|
||||||
var time = challengeSpec.time || 'N/A';
|
var time = challengeSpec.time || 'N/A';
|
||||||
|
var isLocked = !!challengeSpec.isLocked;
|
||||||
|
var message = challengeSpec.message;
|
||||||
|
|
||||||
console.log('parsed %s successfully', blockName);
|
console.log('parsed %s successfully', blockName);
|
||||||
|
|
||||||
@ -54,8 +56,10 @@ Observable.combineLatest(
|
|||||||
dashedName: dasherize(blockName),
|
dashedName: dasherize(blockName),
|
||||||
superOrder: superOrder,
|
superOrder: superOrder,
|
||||||
superBlock: superBlock,
|
superBlock: superBlock,
|
||||||
|
superBlockMessage: message,
|
||||||
order: order,
|
order: order,
|
||||||
time: time
|
time: time,
|
||||||
|
isLocked: isLocked
|
||||||
};
|
};
|
||||||
|
|
||||||
return createBlocks(block)
|
return createBlocks(block)
|
||||||
@ -85,6 +89,7 @@ Observable.combineLatest(
|
|||||||
challenge.blockId = block.id;
|
challenge.blockId = block.id;
|
||||||
challenge.isBeta = challenge.isBeta || isBeta;
|
challenge.isBeta = challenge.isBeta || isBeta;
|
||||||
challenge.isComingSoon = challenge.isComingSoon || isComingSoon;
|
challenge.isComingSoon = challenge.isComingSoon || isComingSoon;
|
||||||
|
challenge.isLocked = challenge.isLocked || isLocked;
|
||||||
challenge.time = challengeSpec.time;
|
challenge.time = challengeSpec.time;
|
||||||
challenge.superOrder = superOrder;
|
challenge.superOrder = superOrder;
|
||||||
challenge.superBlock = superBlock
|
challenge.superBlock = superBlock
|
||||||
|
Reference in New Issue
Block a user