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

[Admin] Update and Manage Site Owner Contact Information #988

Open
mehalyna opened this issue Nov 28, 2024 · 0 comments
Open

[Admin] Update and Manage Site Owner Contact Information #988

mehalyna opened this issue Nov 28, 2024 · 0 comments
Assignees

Comments

@mehalyna
Copy link
Collaborator

mehalyna commented Nov 28, 2024

As an Admin,
I want to update the site owner's contact information through the admin panel,
So that the updated details are stored in a dedicated database entity with a timestamp and are automatically reflected in the website footer.


Acceptance Criteria:

Contact Management Interface:

  • A section in the admin panel titled "Керування контактами" (Manage Contacts).
  • Editable fields include:
    • Назва компанії/установи (Company/Institution Name).
    • Адреса (Address).
    • Електронна пошта (Email).
    • Телефон (Phone Number).

Validation Rules:

  • Email field:
    • Must accept only valid email formats (e.g., example@domain.com).
  • Phone Number field:
    • Accepts international formats.
    • Must have a minimum of 9 digits.
  • Address field:
    • Accepts alphanumeric characters and special symbols (e.g., commas, periods).
  • Company/Institution Name:
    • Allows up to 100 characters, supporting Ukrainian letters and common symbols.

Database Entity:

  • A new database entity is created to store contact information:
    • Table Name: сontact_information
    • Fields:
      • id: Auto-increment primary key.
      • company_name (string): Name of the company/institution.
      • address (string): Physical address.
      • email (string): Contact email.
      • phone (string): Contact phone number.
      • updated_at (timestamp): Date and time of the last update.
      • admin_user (string): Username or ID of the admin who made the change.

Dynamic Footer Updates:

  • The website footer retrieves the latest contact information from the database dynamically.
  • Changes are reflected immediately without requiring manual cache clearing or page reloads.
  • If the database is inaccessible, a default set of contact details (stored as a backup) is displayed.

Real-Time Feedback:

  • After saving changes:
    • Success message: "Контактна інформація успішно оновлена!" (Contact information successfully updated!).
  • Error scenarios:
    • If saving fails (e.g., database connection issue):
      • Error message: "Не вдалося зберегти зміни. Перевірте з’єднання з базою даних." (Failed to save changes. Please check the database connection.).

Fallback Mechanism:

  • If the contact_information database entity is unavailable or empty:
    • The website footer uses the last known backup stored locally.

Technical Notes:

  1. Entity Location:
    • Ensure the contact_information entity is part of a secure schema with write permissions only for authorized admin users.
  2. Backup Strategy:
    • Automatically back up the contact_information table before every update to prevent data loss.

Mockup

image

image


Mockup link https://www.figma.com/design/MFmFKJ2Qz8Sg78Jl5AuLh8/Forum-(Copy)?node-id=7561-28522&node-type=frame&t=DTkn3QVeF1kZ9qXS-0


Epic link #798

@mehalyna mehalyna changed the title [Admin] Manage Site Owner Contact Information (Stored in JSON File) [Admin] Update and Manage Site Owner Contact Information Nov 29, 2024
@KuzykY KuzykY self-assigned this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants