-
Notifications
You must be signed in to change notification settings - Fork 2
feat(trainsformer): edit trainsformer export #1341
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
Open
rudiejd
wants to merge
19
commits into
master
Choose a base branch
from
feat/edit-trainsformer-export
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+731
−125
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4841fae
feat(trainsformer): edit trainsformer export
rudiejd 56cc949
fixup: make edit form display in place of row that is being edited, s…
rudiejd eff9cf0
fixup: working on making service date days of week selectable
rudiejd efd16e7
fixup: add migrations
rudiejd 3c47109
fixup: make upload display correctly
rudiejd a932cc6
fixup: add multi select checkbox, debug statements
rudiejd 88ada0f
fixup: fix adding service timeframe
rudiejd 5847e4f
fixup: add delete_all to migration
rudiejd 4a718b1
fixup: also add delete_all to schema
rudiejd 39688e3
fixup: use Phoenix.Form.input_value, no need to match against changeset
rudiejd bad805a
fixup: no need to cast service_date_id
rudiejd 67cd874
fixup: remove unused event
rudiejd d3194fc
fixup: credo
rudiejd 560fb90
fixup: fixing tests
rudiejd eed49a3
fixup: credo'd
rudiejd dfb0b54
fixup: make integration tests pass
rudiejd a11cdc0
fixup: fix unit tests
rudiejd ec56f2b
fixup: credo
rudiejd 5a02235
fixup: dialyzer
rudiejd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| defmodule Arrow.Trainsformer.ServiceDateDayOfWeek do | ||
| @moduledoc "Describes the days of week for which a service should be active, within some date range" | ||
|
|
||
| use Arrow.Schema | ||
| import Ecto.Changeset | ||
|
|
||
| typed_schema "service_date_days_of_week" do | ||
| field :day_name, Ecto.Enum, values: Arrow.Util.DayOfWeek.day_name_values() | ||
| belongs_to :service_date, Arrow.Trainsformer.ServiceDate, on_replace: :delete | ||
|
|
||
| timestamps() | ||
| end | ||
|
|
||
| @doc false | ||
| def changeset(service_date_days_of_week, attrs) do | ||
| service_date_days_of_week | ||
| |> cast(attrs, [:day_name]) | ||
| |> validate_required([:day_name]) | ||
| |> assoc_constraint(:service_date) | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I'm wondering if we should specify
on_delete?the docs say
And you already have
on_deletespecified in the migration.