Skip to content

Clean stop timetable edition#89

Merged
kun2985 merged 4 commits into
hove-io:line-timetablefrom
Tisseo:clean-stop-timetable-edition
Dec 23, 2015
Merged

Clean stop timetable edition#89
kun2985 merged 4 commits into
hove-io:line-timetablefrom
Tisseo:clean-stop-timetable-edition

Conversation

@vpassama
Copy link
Copy Markdown

@vpassama vpassama commented Dec 1, 2015

Because Mtt doesn't provide anymore the function 'edit a stopPoint', some cleaning is needed.

@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from 85012b4 to 88b0bd2 Compare December 2, 2015 08:15
@vpassama vpassama force-pushed the clean-stop-timetable-edition branch 3 times, most recently from 178c525 to f2959a1 Compare December 2, 2015 10:52
@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from f2959a1 to 48a2193 Compare December 2, 2015 12:36
@vpassama
Copy link
Copy Markdown
Author

vpassama commented Dec 2, 2015

Hi,

I have some problems with the FrequencyControllerTest result :

1) CanalTP\MttBundle\Tests\Functional\Controller\FrequencyControllerTest::testEditForm
Failed asserting that false is true.

When I check the html content :

public function testEditForm() {
    [...]
    echo $crawler->text()
    $this->assertTrue($crawler->filter('html:contains("' . $content . '")')->count() > 0);
}

I see that the result is returning an error :

Navitia\Component\Exception\NotFound\UnknownObjectException: Navitia error message: The region fr-cen doesn't exists
    at n/a
        in /var/www/nmm-merge/vendor/canaltp/navitia/NavitiaExceptionFactory.php line 44

    at Navitia\Component\NavitiaExceptionFactory->create('404', 'unknown_object', 'The region fr-cen doesn't exists')
        in /var/www/nmm-merge/vendor/canaltp/navitia/Service/NavitiaService.php line 231

    at Navitia\Component\Service\NavitiaService->errorProcessor('{"message":"The region fr-cen doesn't exists","error":{"message":"The region fr-cen doesn't exists","id":"unknown_object"}}', '404')
        in /var/www/nmm-merge/vendor/canaltp/navitia/Service/NavitiaService.php line 172

    at Navitia\Component\Service\NavitiaService->callApi(object(CoverageRequest), null)
        in /var/www/nmm-merge/vendor/canaltp/navitia/Service/NavitiaService.php line 75

    at Navitia\Component\Service\NavitiaService->process(array('api' => 'coverage', 'parameters' => array('region' => 'fr-cen', 'path_filter' => 'routes/route:TTR:Nav155', 'parameters' => '?depth=3')), null, '5000', true)

@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from 48a2193 to 64d6825 Compare December 2, 2015 13:25
@vpassama vpassama added help wanted and removed WIP labels Dec 2, 2015
@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from 6b24c3e to 3c40e44 Compare December 2, 2015 15:55
@vpassama
Copy link
Copy Markdown
Author

vpassama commented Dec 2, 2015

Something is broken in the left_menu when editing a stopTimetable.

There is a link to preview page but no externalStopPointId is provided. Maybe we should provide the 'first' stopPoint on the route to this menu ?

@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from 3c40e44 to de4829b Compare December 2, 2015 16:17
@vpassama
Copy link
Copy Markdown
Author

vpassama commented Dec 7, 2015

I'm currently working on the pdf generation. It would be great to deploy a new 'line-timetable' branch in https://github.com/CanalTP/AmqpMttWorkers because some changes are needed.

@vpassama
Copy link
Copy Markdown
Author

vpassama commented Dec 7, 2015

I have a failure in TimetableControllerTest.php :

Starting test 'CanalTP\MttBundle\Tests\Functional\Controller\TimetableControllerTest::testAccess'.
PHP Fatal error:  Call to a member function getCustomer() on a non-object in /var/www/nmm-merge/vendor/canaltp/mtt-bundle/Controller/StopTimetableController.php on line 133

https://github.com/CanalTP/MttBundle/blob/line-timetable/Tests/Functional/Controller/TimetableControllerTest.php#L116-L121

I don't know if I really broke something here. When I try to access this view when I'm not logged in, I have the same error.

@vpassama vpassama force-pushed the clean-stop-timetable-edition branch 2 times, most recently from 89b0516 to 2ee5ac6 Compare December 7, 2015 12:46
@vpassama vpassama force-pushed the clean-stop-timetable-edition branch from 2ee5ac6 to 4886a32 Compare December 7, 2015 13:10
@dvdn
Copy link
Copy Markdown
Contributor

dvdn commented Dec 9, 2015

As we spoke about AmqpMttWorkers, a new branch is available :
https://github.com/CanalTP/AmqpMttWorkers/tree/line-timetable

@vpassama
Copy link
Copy Markdown
Author

vpassama commented Dec 9, 2015

👍

@vpassama
Copy link
Copy Markdown
Author

Hey @dvdn, as said before :

Something is broken in the left_menu when editing a stopTimetable.

There is a link to preview page but no externalStopPointId is provided. Maybe we should provide the > 'first' stopPoint on the route to this menu ?

Something is broken between edition and preview in the left_menu. Do you want me to fix this ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You deleted the parametre "stopPointLevel" there, but this parametre is not deleted in the file "/Resources/views/Layouts/timegrid.html.twig".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right but is this file really used somewhere ?

@kun2985
Copy link
Copy Markdown
Contributor

kun2985 commented Dec 21, 2015

I use your template https://github.com/Tisseo/MttTemplate to test.
I found that there is some probleme in the template compared with the pr:

  • stop.html.twig
    • at line 63 the macro is not exist: {{ macros.notes(notes, notesType) }}
    • at line 76 include "CanalTPMttBundle:Layouts:common.js.twig" should be "common.html.twig"
    • at line 76 include "CanalTPMttBundle:Layouts:common.html.twig" without the parameter "timetable" who is used in the file "common.html.twig"
  • /mtt-bundle/Resources/public/js/layout.js
    • at line 41 "'blockType': $(this).data('type')" should be "'blockType': $(this).data('block-type')"

@vpassama
Copy link
Copy Markdown
Author

Yes, https://github.com/Tisseo/MttTemplate is not maintained anymore because of the lack of time. You should just use the default templates provided by fixtures.

@kun2985
Copy link
Copy Markdown
Contributor

kun2985 commented Dec 21, 2015

I can't find a template for lines. I have defaults templates for stops in the project. What do you mean "the default templates provided by fixtures"?

@kun2985
Copy link
Copy Markdown
Contributor

kun2985 commented Dec 21, 2015

Can you tell me where to find the link to view "page to edit a simple timecard" for a line.

@vpassama
Copy link
Copy Markdown
Author

This PR isn't about line timetable edition, it just clean the code from stopPoint edition functions. If you want a default template for lines, you should checkout the next PR : #90

kun2985 added a commit that referenced this pull request Dec 23, 2015
@kun2985 kun2985 merged commit 1e96a0b into hove-io:line-timetable Dec 23, 2015
datanel pushed a commit that referenced this pull request May 20, 2016
datanel pushed a commit that referenced this pull request Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants