-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2499 from JazzarKarim/19451-sync-with-main
Cherry Picked all new commits from main to the feature branch
- Loading branch information
Showing
93 changed files
with
2,829 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright © 2024 Province of British Columbia | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""This module wraps the calls to external services used by the API.""" | ||
|
||
from .flags import Flags | ||
|
||
|
||
flags = Flags() # pylint: disable=invalid-name; shared variables are lower case by Flask convention. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Copyright © 2019 Province of British Columbia | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the 'License'); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an 'AS IS' BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Manage the Feature Flags initialization, setup and service.""" | ||
from ldclient import get as ldclient_get, set_config as ldclient_set_config # noqa: I001 | ||
from ldclient.config import Config # noqa: I005 | ||
from ldclient.impl.integrations.files.file_data_source import _FileDataSource | ||
from ldclient.interfaces import UpdateProcessor | ||
|
||
|
||
class FileDataSource(UpdateProcessor): | ||
"""FileDataStore has been removed, so this provides similar functionality.""" | ||
|
||
@classmethod | ||
def factory(cls, **kwargs): | ||
"""Provide a way to use local files as a source of feature flag state. | ||
.. deprecated:: 6.8.0 | ||
This module and this implementation class are deprecated and may be changed or removed in the future. | ||
Please use :func:`ldclient.integrations.Files.new_data_source()`. | ||
The keyword arguments are the same as the arguments to :func:`ldclient.integrations.Files.new_data_source()`. | ||
""" | ||
return lambda config, store, ready: _FileDataSource(store, ready, | ||
paths=kwargs.get('paths'), | ||
auto_update=kwargs.get('auto_update', False), | ||
poll_interval=kwargs.get('poll_interval', 1), | ||
force_polling=kwargs.get('force_polling', False)) | ||
|
||
|
||
class Flags(): | ||
"""Wrapper around the feature flag system. | ||
calls FAIL to FALSE | ||
If the feature flag service is unavailable | ||
AND | ||
there is no local config file | ||
Calls -> False | ||
""" | ||
|
||
def __init__(self, app=None): | ||
"""Initialize this object.""" | ||
self.sdk_key = None | ||
self.app = None | ||
|
||
if app: | ||
self.init_app(app) | ||
|
||
def init_app(self, app): | ||
"""Initialize the Feature Flag environment.""" | ||
self.app = app | ||
self.sdk_key = app.config.get('LD_SDK_KEY') | ||
|
||
if self.sdk_key or app.env != 'production': | ||
|
||
if app.env == 'production': | ||
config = Config(sdk_key=self.sdk_key) | ||
else: | ||
factory = FileDataSource.factory(paths=['flags.json'], | ||
auto_update=True) | ||
config = Config(sdk_key=self.sdk_key, | ||
update_processor_class=factory, | ||
send_events=False) | ||
|
||
ldclient_set_config(config) | ||
client = ldclient_get() | ||
|
||
app.extensions['featureflags'] = client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,64 @@ | ||
[[macros.html]] | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Amalgamation Application</title> | ||
<meta charset="UTF-8"> | ||
<meta name="author" content="BC Registries and Online Services"> | ||
[[common/style.html]] | ||
</head> | ||
<body> | ||
</body> | ||
</html> | ||
<head> | ||
<title>Amalgamation Application</title> | ||
<meta charset="UTF-8"> | ||
<meta name="author" content="BC Registries and Online Services"> | ||
[[common/style.html]] | ||
</head> | ||
<body> | ||
<div class="header"> | ||
<table class="header-table" role="presentation"> | ||
<tr class="no-page-break"> | ||
<td> | ||
[[logo.html]] | ||
</td> | ||
<td> | ||
<div class="report-type">AMALGAMATION APPLICATION</div> | ||
<div class="report-type-desc">{{ entityDescription }} - {{ entityAct }}</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<div class="business-name-header"> | ||
<label class="lbl-business-name"> | ||
{% if business.legalName %} | ||
{{ business.legalName }} | ||
{% elif nameRequest.legalName %} | ||
{{ nameRequest.legalName }} | ||
{% else %} | ||
{{numberedDescription}} | ||
{% endif %} | ||
</label> | ||
</div> | ||
</div> | ||
[[common/businessDetails.html]] | ||
<div class="no-page-break"> | ||
<div class="section-header mt-5 pt-4">AMALGAMATION APPLICATION</div> | ||
</div> | ||
|
||
{% if nameRequest.nrNumber or (not nameRequest.nrNumber and not nameRequest.legalName) %} | ||
<!-- this block is hidden if the name is adopted from amalgamating business --> | ||
[[incorporation-application/nameRequest.html]] | ||
<div class="separator mt-4"></div> | ||
{% endif %} | ||
|
||
[[amalgamation/effectiveDate.html]] | ||
[[amalgamation/approvalType.html]] | ||
[[amalgamation/amalgamatingCorp.html]] | ||
[[amalgamation/amalgamationStmt.html]] | ||
[[incorporation-application/completingParty.html]] | ||
|
||
<div class="section-header mt-7 pt-4">NOTICE OF ARTICLES</div> | ||
<div class="container pt-4"> | ||
[[amalgamation/amalgamationName.html]] | ||
{% if business.legalType in ['BEN', 'CC', 'ULC'] %} | ||
<div class="separator mt-4"></div> | ||
{% endif %} | ||
[[common/statement.html]] | ||
[[common/addresses.html]] | ||
[[common/directors.html]] | ||
[[common/shareStructure.html]] | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
legal-api/report-templates/template-parts/amalgamation/amalgamatingCorp.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
<div class="no-page-break"> | ||
<div class="separator mt-4"></div> | ||
<div class="section-title mt-4">Amalgamating Businesses Information</div> | ||
</div> | ||
<table class="section-data amalgamation-table mt-4" role="presentation"> | ||
<tr class="no-page-break"> | ||
<td class="col-50"> | ||
<div class="section-sub-title">Amalgamating Business</div> | ||
</td> | ||
<td class="col-50"> | ||
<div class="section-sub-title">Incorporation Number</div> | ||
</td> | ||
</tr> | ||
{% for entity in amalgamatingBusinesses %} | ||
<tr class="no-page-break"> | ||
<td class="col-50"> | ||
<div class="upper-text pt-2"> | ||
{{ entity.legalName }} | ||
</div> | ||
</td> | ||
<td class="col-50"> | ||
<div class="upper-text pt-2"> | ||
{{ entity.identifier }} | ||
</div> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> |
8 changes: 8 additions & 0 deletions
8
legal-api/report-templates/template-parts/amalgamation/amalgamationName.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Name of Amalgamated Company: | ||
{% if business.legalName %} | ||
{{ business.legalName }} | ||
{% elif nameRequest.legalName %} | ||
{{ nameRequest.legalName }} | ||
{% else %} | ||
{{numberedDescription}} | ||
{% endif %} |
11 changes: 11 additions & 0 deletions
11
legal-api/report-templates/template-parts/amalgamation/amalgamationStmt.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="no-page-break"> | ||
<div class="separator mt-4"></div> | ||
<div class="section-title mt-4"> | ||
<span>Amalgamation Statement</span> | ||
</div> | ||
<div class="section-data nt-3 pt-3"> | ||
This amalgamation has been effected without court approval. A copy of all of the required affidavits under section 277(1) have been obtained and the affidavit | ||
obtained from each amalgamating company has been deposited in that company's records office. | ||
</div> | ||
|
||
</div> |
Oops, something went wrong.