Skip to content

Conversation

@sauloperez
Copy link
Collaborator

@sauloperez sauloperez commented Sep 17, 2016

This addresses http://community.coopdevs.org/t/evitar-pago-de-horas-a-uno-mismo/52

It is veeeery early stage. Now what I want to do is add unit tests to this GiveTime service. Once done, I'll be able to move around with confidence and forbid the following:

en general evitar el pago de horas a uno mismo.

captura de pantalla 2016-11-16 a les 13 21 44

As you can see below, it translated it in the three languages, and I also removed the clock icon.

@sauloperez sauloperez added the wip label Sep 17, 2016
Copy link
Contributor

@enricostano enricostano left a comment

Choose a reason for hiding this comment

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

💪 G R A C I A S 💪

Gemfile Outdated
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '2.3.0'
ruby '2.3.1'
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ que no se cuele esto, es una known issue que estamos gestionando en el repo de provisioning. Coming soon 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Algún dia lo arreglaremos verdad @enricostano 😬 😬

Gemfile.lock Outdated
whenever

RUBY VERSION
ruby 2.3.1p112
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ que no se cuele esto, es una known issue que estamos gestionando en el repo de provisioning. Coming soon 😬

Copy link
Collaborator Author

@sauloperez sauloperez Nov 16, 2016

Choose a reason for hiding this comment

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

How is this ruby version thing @enricostano ? I need it to run this PR in my machine... we better fix it asap so that this branch can be merged without this change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Porfi quitemos los cambios relacionados a ruby de este PR. Tenemos que arreglar algo en production antes de poder tener esto listo.

Hay un PR esperando a que podamos hacer los cambios necesarios en production... De momento please.. simplemente ignorar estos cambios.

Gracias por la paciencia.

@sauloperez
Copy link
Collaborator Author

Ok @enricostano. Es uno de los issues que he tenido con el provisioning.

Gemfile.lock Outdated
whenever

RUBY VERSION
ruby 2.3.1p112
Copy link
Collaborator Author

@sauloperez sauloperez Nov 16, 2016

Choose a reason for hiding this comment

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

How is this ruby version thing @enricostano ? I need it to run this PR in my machine... we better fix it asap so that this branch can be merged without this change.

)

if transfer.valid?
transfer.make_movements
Copy link
Collaborator Author

@sauloperez sauloperez Nov 16, 2016

Choose a reason for hiding this comment

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

note is not persisted yet. Pending. So far, there's no way not to make the movement if the record is not valid.


def different_source_and_destination
return unless source == destination
errors.add(:base, :same_account)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this gets populated from the locales below by rails

I only tried to make a transfer and it worked. I followed EDD; going through
each of the errors until it worked, because I didn't find any test for this
action in the controller. Unit testing the service should be the next task.
This disables transfering time to yourself
It adds a validation on the Transfer model and shows a flash error
message when that happens, without making the actual movement.
Due to a bug passing the string argument to #link_to, said string didn't
show up in the page. The way is written now, it shows, so we need to
hide it to be consistent.
@sseerrggii
Copy link
Contributor

Everything works fine 👍 Thanks @sauloperez

@enricostano enricostano merged commit 1a68f29 into develop Nov 18, 2016
@enricostano enricostano deleted the disable-auto-payment branch November 18, 2016 17:18
@sauloperez
Copy link
Collaborator Author

🎉

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.

4 participants