Skip to content
New issue

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

Multi location internships & React-based Editor #336

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d67b1f9
Made student component
cambelem Mar 14, 2016
c897909
Finalized the student component.
cambelem Mar 22, 2016
3d9c266
Added emergency contact component, started status component and added…
cambelem Mar 30, 2016
11580ca
Added Faculty Advisor and Status
cambelem Apr 7, 2016
bc2b9c9
Implemented Faculty Advisor Component.
cambelem May 4, 2016
fc0ae5a
Workflow interface working, but not functional.
cambelem May 5, 2016
a3872ed
Created Course & Term and Type interface - Not functional
cambelem May 6, 2016
eb3a389
Interface is completed however contract component is still broken, un…
cambelem May 16, 2016
63652f8
Added ability to grab the information from the main form when clickin…
cambelem May 24, 2016
34093f4
Added the ability to see multiple agencies for an internship and adde…
cambelem Jun 20, 2016
1af5dc4
Allowed internships to have multiple hosts though saving does not work.
cambelem Jun 28, 2016
0762e2f
Fixed student UI errors in the form (formatting).
cambelem Jun 28, 2016
a23d68e
Cleaned up ui bugs and made Change History and Notes functional.
cambelem Jul 6, 2016
76dd11c
Made student component
cambelem Mar 14, 2016
3559bda
Finalized the student component.
cambelem Mar 22, 2016
38aaa40
Added emergency contact component, started status component and added…
cambelem Mar 30, 2016
f1b4497
Added Faculty Advisor and Status
cambelem Apr 7, 2016
99b4ac8
Implemented Faculty Advisor Component.
cambelem May 4, 2016
c07f3b1
Workflow interface working, but not functional.
cambelem May 5, 2016
ba3a74c
Created Course & Term and Type interface - Not functional
cambelem May 6, 2016
9cb6c44
Interface is completed however contract component is still broken, un…
cambelem May 16, 2016
95c1ed5
Added ability to grab the information from the main form when clickin…
cambelem May 24, 2016
e38f013
Added the ability to see multiple agencies for an internship and adde…
cambelem Jun 20, 2016
b800b8e
Allowed internships to have multiple hosts though saving does not work.
cambelem Jun 28, 2016
03fa4d7
Fixed student UI errors in the form (formatting).
cambelem Jun 28, 2016
92abe5e
Cleaned up ui bugs and made Change History and Notes functional.
cambelem Jul 6, 2016
5a39b37
Fixed rebasing issues and bugs.
cambelem Jul 6, 2016
6a495bf
Merging files..
cambelem Jul 6, 2016
ebfaa0e
Fixed type definitions using a modal and started contract component.
cambelem Jul 8, 2016
bb30bdc
Saves a package of data to be used for saving. Still working on react…
cambelem Aug 16, 2016
ca3a333
Added missing fields to aid in saving.
cambelem Oct 7, 2016
4902c35
Merge remote-tracking branch 'origin/reactEditInternship' into reactE…
Jan 11, 2017
21d1d40
Fixed internship view to use webpack.
Jan 26, 2017
a9ef448
Fixed bugs preventing edit intern view from showing.
Apr 19, 2017
2e08110
Merge pull request #335 from cambelem/reactEditInternWP
jlbooker Apr 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions boost/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function intern_update(&$content, $currentVersion)
case version_compare($currentVersion, '0.0.16', '<') :
internRunDbMigration('update_0_0_16.sql');
case version_compare($currentVersion, '0.0.17', '<') :
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.0.18', '<') :
internRunDbMigration('update_0_0_18.sql');
Expand All @@ -61,7 +61,7 @@ function intern_update(&$content, $currentVersion)
case version_compare($currentVersion, '0.0.24', '<') :
internRunDbMigration('update_0_0_24.sql');
case version_compare($currentVersion, '0.0.25', '<') :
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.0.26', '<') :
internRunDbMigration('update_0_0_26.sql');
Expand All @@ -77,15 +77,15 @@ function intern_update(&$content, $currentVersion)
internRunDbMigration('update_0_0_31.sql');
case version_compare($currentVersion, '0.0.32', '<') :
internRunDbMigration('update_0_0_32.sql');
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.0.33', '<') :
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.0.35', '<') :
internRunDbMigration('update_0_0_35.sql');
case version_compare($currentVersion, '0.0.36', '<') :
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.0.37', '<') :
internRunDbMigration('update_0_0_37.sql');
Expand All @@ -112,7 +112,7 @@ function intern_update(&$content, $currentVersion)
case version_compare($currentVersion, '0.1.10', '<') :
internRunDbMigration('update_00.01.10.sql');
case version_compare($currentVersion, '0.1.15', '<') :
PHPWS_Core::initModClass('users', 'Permission.php');
\PHPWS_Core::initModClass('users', 'Permission.php');
Users_Permission::registerPermissions('intern', $content);
case version_compare($currentVersion, '0.1.21', '<') :
internRunDbMigration('update_00.01.21.sql');
Expand Down
25 changes: 15 additions & 10 deletions class/ChangeHistoryView.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,39 @@ public function show()
{
$tpl = array();

$tpl['CHANGELOG_REPEAT'] = array();

$changes = ChangeHistoryFactory::getChangesForInternship($this->internship);

if(is_null($changes)){
return "";
}

// Needed for key value in react -> ChangeFields class
// untill something better can be thought of.
$id = 0;

foreach($changes as $change){
$changeFields = array();
$changeFields['id'] = $id++;

$changeFields['RELATIVE_DATE'] = $change->getRelativeDate();
$changeFields['EXACT_DATE'] = $change->getFormattedDate();
$changeFields['USERNAME'] = $change->getUsername();
$changeFields['relative_date'] = $change->getRelativeDate();
$changeFields['exact_date'] = $change->getFormattedDate();
$changeFields['username'] = $change->getUsername();

if($change->getFromStateFriendlyname() != $change->getToStateFriendlyName()){
$changeFields['FROM_STATE'] = $change->getFromStateFriendlyName();
$changeFields['TO_STATE'] = $change->getToStateFriendlyName();
$changeFields['from_state'] = $change->getFromStateFriendlyName();
$changeFields['to_state'] = $change->getToStateFriendlyName();
}

$note = $change->getNote();
if(!is_null($note)){
$changeFields['NOTE'] = $note;
$changeFields['note'] = $note;
} else {
$changeFields['note'] = '';
}

$tpl['changelog_repeat'][] = $changeFields;
$tpl[] = $changeFields;
}

return \PHPWS_Template::process($tpl, 'intern', 'changeHistory.tpl');
return $tpl;
}
}
Loading