Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

58
Views
Storing action mapping for an Angular app

I have an Angular application that manipulates data in sets. My users can perform actions on each record. They also want to be able to perform actions on the entire set. But the business rules state that some actions cannot be performed on certain data.

I want to create a generic method that will loop through the data and perform the action only if the data meets the criteria for that action. I can do this easily enough. My issue is where to store this action-to-criteria mapping. I can create a table and have it retrieved through a web service. I can store it in the web app in a JSON file. But these seem more complicated than necessary when we consider that retrieving this data will be asynchronous and will need to be stored somewhere in memory. But I obviously don't want to hard-code it either. The business rules would almost never change, and if they did, it would be adding new actions.

This table shows a very simplified version of what I need to accomplish. If the user is working on a list of 100 records and clicks on the "Archive All" button, I want to scan the records and only archive the records that are in the completed phase. I want to be able to reuse this method for the other buttons as well. What is the best practice for storing something like this?

Phase Save All Send All Archive All
New Y N N
In Progress Y Y N
Completed Y Y Y
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!