Skip to content

Direct Transfers Between Allied Organizations #796

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
wants to merge 9 commits into
base: interorg-user-contact
Choose a base branch
from

Conversation

gmartincor
Copy link
Collaborator

@gmartincor gmartincor commented May 20, 2025

Direct Transfers Between Allied Organizations

Grabacion.de.pantalla.2025-05-20.a.las.12.07.14.mp4

Description

This PR adds functionality to perform direct transfers between torganizations that have an active alliance.

Changes Made

New Controller

  • Implementation of OrganizationTransfersController to manage specific transfers between allied organizations.

View Modifications

  • Added "Transfer Hours" button on the organization detail view when an active alliance exists
  • Created form to perform transfers between organizations
  • Interface to display completed transfers with a specific label

Transfer Helper Modification

  • Implementation of the is_bank_to_bank_transfer? method to identify direct transfers made between organizations

Route Configuration

  • New routes for the direct transfer flow between organizations

Tests

  • Tests for the OrganizationTransfersController verifying permissions and correct flow
  • Tests for the TransfersHelper with the newly implemented method

Behavior

  • Only administrators can perform direct transfers from their time bank
  • Transfers are only allowed between banks that have an alliance with "accepted" status
  • Transfers are identified with a special label "Bank-to-Bank Transfer"
  • The balance of both organizations' accounts is updated
  • No post is associated with these transfers, as they represent direct collaborations between banks

Security

  • Validations to ensure only administrators can perform direct transfers
  • Verification of the existence and status of the alliance between organizations before allowing transfers
  • Restriction of allowed parameters to prevent mass assignments

@gmartincor gmartincor changed the title Direct Transfers Between Allied Time Banks Direct Transfers Between Allied Organizations May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant