Merge remote-tracking branch 'origin/release/2025-11-21' into feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration
This commit is contained in:
@@ -4,10 +4,18 @@ import { useTranslation } from "react-i18next";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||
|
||||
export default function ShopInfoSpeedPrint() {
|
||||
const { t } = useTranslation();
|
||||
const TemplateListGenerated = TemplateList("job");
|
||||
const allTemplates = TemplateList("job");
|
||||
const TemplateListGenerated = InstanceRenderManager({
|
||||
imex: Object.fromEntries(
|
||||
Object.entries(allTemplates).filter(([, { enhanced_payroll }]) => !enhanced_payroll)
|
||||
),
|
||||
rome: allTemplates
|
||||
});
|
||||
|
||||
return (
|
||||
<Form.List name={["speedprint"]}>
|
||||
{(fields, { add, remove, move }) => {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
alter table "public"."media_analytics_detail" drop constraint "media_analytics_detail_jobid_fkey",
|
||||
add constraint "media_analytics_detail_jobid_fkey"
|
||||
foreign key ("jobid")
|
||||
references "public"."jobs"
|
||||
("id") on update restrict on delete restrict;
|
||||
@@ -0,0 +1,5 @@
|
||||
alter table "public"."media_analytics_detail" drop constraint "media_analytics_detail_jobid_fkey",
|
||||
add constraint "media_analytics_detail_jobid_fkey"
|
||||
foreign key ("jobid")
|
||||
references "public"."jobs"
|
||||
("id") on update set null on delete set null;
|
||||
@@ -0,0 +1,23 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- CREATE OR REPLACE FUNCTION set_fk_to_null_if_invalid_media_analytics()
|
||||
-- RETURNS TRIGGER AS $$
|
||||
-- BEGIN
|
||||
-- -- Check if the foreign key value is not NULL
|
||||
-- IF NEW.jobid IS NOT NULL THEN
|
||||
-- -- Check if the corresponding record exists in the parent table
|
||||
-- IF NOT EXISTS (SELECT 1 FROM jobs WHERE id = NEW.jobid) THEN
|
||||
-- -- If it doesn't exist, set the foreign key to NULL
|
||||
-- NEW.jobid = NULL;
|
||||
-- END IF;
|
||||
-- END IF;
|
||||
--
|
||||
-- -- Return the (potentially modified) record to be inserted/updated
|
||||
-- RETURN NEW;
|
||||
-- END;
|
||||
-- $$ LANGUAGE plpgsql;
|
||||
--
|
||||
-- CREATE TRIGGER media_analytics_fk_null
|
||||
-- BEFORE INSERT OR UPDATE ON media_analytics_detail
|
||||
-- FOR EACH ROW
|
||||
-- EXECUTE FUNCTION set_fk_to_null_if_invalid_media_analytics();
|
||||
@@ -0,0 +1,21 @@
|
||||
CREATE OR REPLACE FUNCTION set_fk_to_null_if_invalid_media_analytics()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
-- Check if the foreign key value is not NULL
|
||||
IF NEW.jobid IS NOT NULL THEN
|
||||
-- Check if the corresponding record exists in the parent table
|
||||
IF NOT EXISTS (SELECT 1 FROM jobs WHERE id = NEW.jobid) THEN
|
||||
-- If it doesn't exist, set the foreign key to NULL
|
||||
NEW.jobid = NULL;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
-- Return the (potentially modified) record to be inserted/updated
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE TRIGGER media_analytics_fk_null
|
||||
BEFORE INSERT OR UPDATE ON media_analytics_detail
|
||||
FOR EACH ROW
|
||||
EXECUTE FUNCTION set_fk_to_null_if_invalid_media_analytics();
|
||||
Reference in New Issue
Block a user