Feat: Founding Partner login with autocreation of User, User Role Link, Company, User Company Link as necessary and autologin with new user - for approved Founding Partners only, otherwise redirected to login page.

This commit is contained in:
2025-08-21 18:37:31 +01:00
parent 07543994bf
commit 12f5fc994f
29 changed files with 1843 additions and 324 deletions

View File

@@ -723,7 +723,7 @@ var API = /*#__PURE__*/function () {
dataRequest[flagCompany] = companies;
dataRequest[flagComment] = comment;
_context4.next = 6;
return API.request(hashSaveDogCompany, 'POST', dataRequest);
return API.request(hashSaveUserCompany, 'POST', dataRequest);
case 6:
return _context4.abrupt("return", _context4.sent);
case 7:
@@ -8993,25 +8993,126 @@ function company_defineProperty(e, r, t) { return (r = company_toPropertyKey(r))
function company_toPropertyKey(t) { var i = company_toPrimitive(t, "string"); return "symbol" == company_typeof(i) ? i : i + ""; }
function company_toPrimitive(t, r) { if ("object" != company_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != company_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var PageUserCompany = /*#__PURE__*/function (_BasePage) {
var company_rowBlankDistraction;
var company_rowBlankAssessmentCommandModalityLink;
var PageUserCompany = /*#__PURE__*/function (_TableBasePage) {
function PageUserCompany(router) {
var _this;
company_classCallCheck(this, PageUserCompany);
return company_callSuper(this, PageUserCompany, [router]);
_this = company_callSuper(this, PageUserCompany, [router]);
company_defineProperty(_this, "callSaveTableContent", API.saveCompanies);
_this.dogMixin = new DogTableMixinPage(_this);
return _this;
}
company_inherits(PageUserCompany, _BasePage);
company_inherits(PageUserCompany, _TableBasePage);
return company_createClass(PageUserCompany, [{
key: "initialize",
value: function initialize() {
this.sharedInitialize();
}
}, {
key: "hookupFilters",
value: function hookupFilters() {}
}, {
key: "loadRowTable",
value: function loadRowTable(rowJson) {
if (rowJson == null) return;
if (_verbose) {
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
}
}
}, {
key: "getTableRecords",
value: function getTableRecords() {
var dirtyOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
dirtyOnly = true;
var container = document.querySelector('.' + flagContainer + '.' + flagUser);
var nameInput = document.getElementById(flagName);
var websiteInput = document.getElementById(flagWebsite);
var companies = [];
if (!dirtyOnly || container.classList.contains(flagDirty)) companies.push(company_defineProperty(company_defineProperty(company_defineProperty(company_defineProperty({}, attrIdCompany, container.getAttribute(attrIdCompany)), flagName, DOM.getElementAttributeValueCurrent(nameInput)), flagWebsite, DOM.getElementAttributeValueCurrent(websiteInput)), flagActive, true));
return companies;
}
}, {
key: "initialiseRowNew",
value: function initialiseRowNew(tbody, row) {}
}, {
key: "postInitialiseRowNewCallback",
value: function postInitialiseRowNewCallback(tbody) {}
}, {
key: "callFilterTableContent",
value: function callFilterTableContent() {
company_superPropGet(PageUserCompany, "callFilterTableContent", this, 3)([]);
}
}, {
key: "hookupTableMain",
value: function hookupTableMain() {
company_superPropGet(PageUserCompany, "hookupTableMain", this, 3)([]);
this.hookupNameInput();
this.hookupWebsiteInput();
}
}, {
key: "hookupNameInput",
value: function hookupNameInput() {
var _this2 = this;
var selector = '#' + flagName;
Events.initialiseEventHandler(selector, flagInitialised, function (nameInput) {
nameInput.addEventListener("change", function (event) {
nameInput = event.target;
var container = document.querySelector('.' + flagContainer + '.' + flagUser);
var wasDirtyContainer = container.classList.contains(flagDirty);
var wasDirtyElement = nameInput.classList.contains(flagDirty);
var isDirtyElement = DOM.updateAndCheckIsElementDirty(nameInput);
if (isDirtyElement == wasDirtyElement) return;
var isDirtyContainer = DOM.hasDirtyChildrenContainer(container); // wasDirtyContainer || isDirtyElement;
if (isDirtyContainer) {
container.classList.add(flagDirty);
} else {
container.classList.remove(flagDirty);
}
_this2.updateAndToggleShowButtonsSaveCancel();
});
});
}
}, {
key: "hookupWebsiteInput",
value: function hookupWebsiteInput() {
var _this3 = this;
var selector = '#' + flagWebsite;
Events.initialiseEventHandler(selector, flagInitialised, function (websiteInput) {
websiteInput.addEventListener("change", function (event) {
websiteInput = event.target;
var container = document.querySelector('.' + flagContainer + '.' + flagUser);
var wasDirtyContainer = container.classList.contains(flagDirty);
var wasDirtyElement = websiteInput.classList.contains(flagDirty);
var isDirtyElement = DOM.updateAndCheckIsElementDirty(websiteInput);
if (isDirtyElement == wasDirtyElement) return;
var isDirtyContainer = DOM.hasDirtyChildrenContainer(container); // wasDirtyContainer || isDirtyElement;
if (isDirtyContainer) {
container.classList.add(flagDirty);
} else {
container.classList.remove(flagDirty);
}
_this3.updateAndToggleShowButtonsSaveCancel();
});
});
}
}, {
key: "leave",
value: function leave() {
company_superPropGet(PageUserCompany, "leave", this, 3)([]);
}
}]);
}(BasePage);
}(TableBasePage);
company_defineProperty(PageUserCompany, "hash", hashPageUserCompany);
company_defineProperty(PageUserCompany, "attrIdRowObject", attrIdCompany);
;// ./static/js/router.js
function router_typeof(o) { "@babel/helpers - typeof"; return router_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, router_typeof(o); }

File diff suppressed because one or more lines are too long