We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Edit Trainin Page from Admin module.
Wiki: Admin Edit Training
src/pages/admin/training/edit
Create a fork.
Start by the simple case, just edit the training data, then move on to next scenarios.
Create new branch called feature/<issue_number>_Create_Edit_Training_Page (where issue_number is the id of this issue given by Github).
Pseudocode proposal:
getTrainingById(id: number): Promise<TrainingEntity> { const training = this.trainingData.find(tr => tr.id === id); return Promise.resolve(training); }
./src/pages/admin/training/edit/actions/trainingFetchRequest (pseudocode)
import { adminActionEnums } from '../../../../../common/actionEnums/admin' import { TrainingEntity} from '../../../../../model/training' import { trainingApi } from '../../../../../rest-api' export const trainingFetchRequestStarted = (trainingId) => { return function(dispatcher) { const promise = trainigApi.getTrainingById(trainingId); promise.then( data => dispatcher(trainingFetchRequestCompleted(data)) ) return promise; } } export const trainingFetchRequestCompleted = (training: TrainingEntity) => ({ type: adminActionEnums.GET_TRAINING_REQUEST_COMPLETED, payload: training });
./src/reducers/adminTrainings.ts
import { Action } from 'redux' import { TrainingEntity } from '../model/trainingEntity' import { adminActionEnums} from '../common/actionEnums/admin' export class AdminTrainingState { training : TrainingEntity; public constructor() { this.training = new Training(); } } export const adminTrainingReducer = (state : AdminTrainingState = new AdminTrainingState(), action) => { switch(action.type) { case adminActionEnums.GET_TRAINING_REQUEST_COMPLETED: return handleGetTrainingRequestCompleted(state, action.payload); } return state; } const handleGetTrainingRequestCompleted= (state : AdminTrainingState, payload : TrainingEntity) => { return { ...state, training: payload }; }
./src/reducers/index.ts
import { combineReducers } from 'redux'; import { AdminStudentState, adminStudentReducer} from './adminStudent' import { AdminTraningState, adminTrainingReducer} from './adminTraining' export interface IAppState { adminStudent : AdminStudentState, adminTrainingState: AdminTraningState } export const reducers = combineReducers<IAppState>({ adminStudent: adminStudentReducer, adminTrainingReducer: adminTrainingReducer });
Implement first tab. only UI for now.
Implement tabs component using react-toolbox.
Add form validations.
Implement first tab with functionality (Save).
Implement second tab.
The text was updated successfully, but these errors were encountered:
#39 Initial Commit + Rename Training model to TrainingEntity + functi…
289f574
…on GetTrainingById in ApiRest and spec
#39 Add training reducer and spec
06a4897
Assigned to @baltika9
Sorry, something went wrong.
joseandb
No branches or pull requests
Implement Edit Trainin Page from Admin module.
Wiki: Admin Edit Training
src/pages/admin/training/edit
.Steps:
Create a fork.
Start by the simple case, just edit the training data, then move on to next scenarios.
Create new branch called feature/<issue_number>_Create_Edit_Training_Page (where issue_number is the id of this issue given by Github).
Pseudocode proposal:
./src/pages/admin/training/edit/actions/trainingFetchRequest
(pseudocode)
./src/reducers/adminTrainings.ts
./src/reducers/index.ts
Next steps:
Implement first tab. only UI for now.
Implement tabs component using react-toolbox.
Add form validations.
Implement first tab with functionality (Save).
Implement second tab.
Important: Follow this work flow
The text was updated successfully, but these errors were encountered: