Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/beta' into release/2.024.19
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm committed Jun 24, 2024
2 parents 9dd9e6f + 613615f commit fc21ac2
Show file tree
Hide file tree
Showing 102 changed files with 3,259 additions and 2,355 deletions.
11 changes: 1 addition & 10 deletions dependencies/pip/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# via -r dependencies/pip/requirements.in
-e git+https://github.com/trevoriancox/django-dont-vary-on.git@01a804122b7ddcdc22f50b40993f91c27b03bef6#egg=django-dont-vary-on
# via -r dependencies/pip/requirements.in
-e git+https://github.com/kobotoolbox/formpack.git@443a8e940756976a9f88fb577dbbc53510726536#egg=formpack
-e git+https://github.com/kobotoolbox/formpack.git@451df4cd2a0d614be69a3b3309259c67369f7efb#egg=formpack
# via -r dependencies/pip/requirements.in
-e git+https://github.com/kobotoolbox/kobo-service-account.git@8ee76730106ff8dc0ee2539c8e6a567aea4ed9ee#egg=kobo-service-account
# via -r dependencies/pip/requirements.in
Expand Down Expand Up @@ -530,15 +530,6 @@ six==1.16.0
# via
# asttokens
# azure-core
# bcrypt
# click-repl
# django-organizations
# google-auth
# google-auth-httplib2
# grpcio
# mongomock
# paramiko
# pathlib2
# isodate
# python-dateutil
smsapi-client==2.9.5
Expand Down
4 changes: 2 additions & 2 deletions dependencies/pip/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/bndr/pipreqs is a handy utility, too.

# formpack
-e git+https://github.com/kobotoolbox/formpack.git@443a8e940756976a9f88fb577dbbc53510726536#egg=formpack
-e git+https://github.com/kobotoolbox/formpack.git@451df4cd2a0d614be69a3b3309259c67369f7efb#egg=formpack

# service-account
-e git+https://github.com/kobotoolbox/kobo-service-account.git@8ee76730106ff8dc0ee2539c8e6a567aea4ed9ee#egg=kobo-service-account
Expand Down Expand Up @@ -30,7 +30,7 @@ celery[redis]
dict2xml
dj-static
dj-stripe
django-allauth<0.58 # Backwards incompatible changes
django-allauth
django-braces
django-celery-beat
django-constance
Expand Down
7 changes: 1 addition & 6 deletions dependencies/pip/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# via -r dependencies/pip/requirements.in
-e git+https://github.com/trevoriancox/django-dont-vary-on.git@01a804122b7ddcdc22f50b40993f91c27b03bef6#egg=django-dont-vary-on
# via -r dependencies/pip/requirements.in
-e git+https://github.com/kobotoolbox/formpack.git@443a8e940756976a9f88fb577dbbc53510726536#egg=formpack
-e git+https://github.com/kobotoolbox/formpack.git@451df4cd2a0d614be69a3b3309259c67369f7efb#egg=formpack
# via -r dependencies/pip/requirements.in
-e git+https://github.com/kobotoolbox/kobo-service-account.git@8ee76730106ff8dc0ee2539c8e6a567aea4ed9ee#egg=kobo-service-account
# via -r dependencies/pip/requirements.in
Expand Down Expand Up @@ -443,11 +443,6 @@ shortuuid==1.0.13
six==1.16.0
# via
# azure-core
# click-repl
# django-organizations
# google-auth
# google-auth-httplib2
# grpcio
# isodate
# python-dateutil
smsapi-client==2.9.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3>Advanced query search</h3>
<pre>AND date_joined__date__lt:2023-03-01</pre>
</li>
<li>Same as above, but more accurate version with time:
<pre>extra_details__last_password_date_changed__lt:2023-03-01T12:00:00</pre>
<pre>extra_details__password_date_changed__lt:2023-03-01T12:00:00</pre>
<pre>AND date_joined__date__lt:2023-03-01:2023-03-01T12:00:00</pre>
</li>
<li><b>Fields:</b></li>
Expand Down
12 changes: 6 additions & 6 deletions jsapp/js/account/security/mfa/mfaSection.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ToggleSwitch from 'js/components/common/toggleSwitch';
import Icon from 'js/components/common/icon';
import InlineMessage from 'js/components/common/inlineMessage';
import LoadingSpinner from 'js/components/common/loadingSpinner';
import {stores} from 'js/stores';
import type {
MfaUserMethodsResponse,
MfaActivatedResponse,
Expand All @@ -15,6 +14,7 @@ import {MODAL_TYPES} from 'jsapp/js/constants';
import envStore from 'js/envStore';
import './mfaSection.scss';
import {formatTime, formatDate} from 'js/utils';
import pageState from 'js/pageState.store';

bem.SecurityRow = makeBem(null, 'security-row');
bem.SecurityRow__header = makeBem(bem.SecurityRow, 'header');
Expand Down Expand Up @@ -70,7 +70,7 @@ export default class SecurityRoute extends React.Component<{}, SecurityState> {
),
mfaActions.activate.completed.listen(this.mfaActivating.bind(this)),
mfaActions.confirmCode.completed.listen(this.mfaActivated.bind(this)),
mfaActions.deactivate.completed.listen(this.mfaDeactivated.bind(this)),
mfaActions.deactivate.completed.listen(this.mfaDeactivated.bind(this))
);

mfaActions.getUserMethods();
Expand Down Expand Up @@ -103,7 +103,7 @@ export default class SecurityRoute extends React.Component<{}, SecurityState> {

mfaActivating(response: MfaActivatedResponse) {
if (response && !response.inModal) {
stores.pageState.showModal({
pageState.showModal({
type: MODAL_TYPES.MFA_MODALS,
qrCode: response.details,
modalType: 'qr',
Expand Down Expand Up @@ -133,7 +133,7 @@ export default class SecurityRoute extends React.Component<{}, SecurityState> {
if (isActive) {
mfaActions.activate();
} else {
stores.pageState.showModal({
pageState.showModal({
type: MODAL_TYPES.MFA_MODALS,
modalType: 'deactivate',
customModalHeader: this.renderCustomHeader(),
Expand All @@ -149,7 +149,7 @@ export default class SecurityRoute extends React.Component<{}, SecurityState> {
) {
evt.preventDefault();

stores.pageState.showModal({
pageState.showModal({
type: MODAL_TYPES.MFA_MODALS,
modalType: type,
customModalHeader: this.renderCustomHeader(),
Expand Down Expand Up @@ -202,7 +202,7 @@ export default class SecurityRoute extends React.Component<{}, SecurityState> {
/>
</bem.SecurityRow__buttons>
</bem.SecurityRow__switch>
</bem.SecurityRow__header>
</bem.SecurityRow__header>

{this.state.isMfaActive && this.state.isMfaAvailable && (
<bem.MFAOptions>
Expand Down
86 changes: 80 additions & 6 deletions jsapp/js/actions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ interface GetSubmissionCompletedDefinition extends Function {
listen: (callback: (response: SubmissionResponse) => void) => Function;
}

interface GetSubmissionsDefinition extends Function {
(options: GetSubmissionsOptions): void;
completed: GetSubmissionsCompletedDefinition;
failed: GenericFailedDefinition;
}

interface GetSubmissionsCompletedDefinition extends Function {
(response: PaginatedResponse<SubmissionResponse>, options: GetSubmissionsOptions): void;
listen: (callback: (response: PaginatedResponse<SubmissionResponse>, options: GetSubmissionsOptions) => void) => Function;
}

interface GetProcessingSubmissionsDefinition extends Function {
(assetUid: string, questionsPaths: string[]): void;
completed: GetProcessingSubmissionsCompletedDefinition;
Expand Down Expand Up @@ -89,6 +100,66 @@ interface GetExportCompletedDefinition extends Function {
listen: (callback: (response: any) => void) => Function;
}

interface TableUpdateSettingsDefinition extends Function {
(assetUid: string, newSettings: object): void;
completed: GenericCallbackDefinition;
failed: GenericFailedDefinition;
}

interface UpdateSubmissionValidationStatusDefinition extends Function {
(
assetUid: string,
submissionUid: string,
data: {'validation_status.uid': ValidationStatus}
): void;
completed: AnySubmissionValidationStatusCompletedDefinition;
failed: GenericFailedDefinition;
}

interface AnySubmissionValidationStatusCompletedDefinition extends Function {
(result: ValidationStatusResponse, sid: string): void;
listen: (callback: (result: ValidationStatusResponse, sid: string) => void) => Function;
}

interface RemoveSubmissionValidationStatusDefinition extends Function {
(assetUid: string, submissionUid: string): void;
completed: AnySubmissionValidationStatusCompletedDefinition;
failed: GenericFailedDefinition;
}

interface DuplicateSubmissionDefinition extends Function {
(assetUid: string, submissionUid: string, data: SubmissionResponse): void;
completed: DuplicateSubmissionCompletedDefinition;
failed: GenericFailedDefinition;
}

interface DuplicateSubmissionCompletedDefinition extends Function {
(assetUid: string, submissionUid: string, duplicatedSubmission: SubmissionResponse): void;
listen: (callback: (assetUid: string, submissionUid: string, duplicatedSubmission: SubmissionResponse) => void) => Function;
}

interface GetUserDefinition extends Function {
(username: string): void;
completed: GetUserCompletedDefinition;
failed: GenericFailedDefinition;
}

interface GetUserCompletedDefinition extends Function {
(response: AccountResponse): void;
listen: (callback: (response: AccountResponse) => void) => Function;
}

interface SetAssetPublicDefinition extends Function {
(asset: AssetResponse, shouldSetAnonPerms: boolean): void;
completed: SetAssetPublicCompletedDefinition;
failed: GenericFailedDefinition;
}

interface SetAssetPublicCompletedDefinition extends Function {
(assetUid: string, shouldSetAnonPerms: boolean): void;
listen: (callback: (assetUid: string, shouldSetAnonPerms: boolean) => void) => Function;
}

// NOTE: as you use more actions in your ts files, please extend this namespace,
// for now we are defining only the ones we need.
export namespace actions {
Expand All @@ -114,18 +185,20 @@ export namespace actions {
listTags: GenericDefinition;
createResource: GenericDefinition;
updateAsset: UpdateAssetDefinition;
updateSubmissionValidationStatus: GenericDefinition;
removeSubmissionValidationStatus: GenericDefinition;
updateSubmissionValidationStatus: UpdateSubmissionValidationStatusDefinition;
removeSubmissionValidationStatus: RemoveSubmissionValidationStatusDefinition;
deleteSubmission: GenericDefinition;
duplicateSubmission: GenericDefinition;
duplicateSubmission: DuplicateSubmissionDefinition;
refreshTableSubmissions: GenericDefinition;
getAssetFiles: GenericDefinition;
};
const hooks: object;
const misc: object;
const misc: {
getUser: GetUserDefinition;
};
const reports: object;
const table: {
updateSettings: (assetUid: string, newSettings: object) => void;
updateSettings: TableUpdateSettingsDefinition;
};
const map: object;
const permissions: {
Expand All @@ -135,6 +208,7 @@ export namespace actions {
assignAssetPermission: GenericDefinition;
bulkSetAssetPermissions: GenericDefinition;
getAssetPermissions: GenericDefinition;
setAssetPublic: SetAssetPublicDefinition;
};
const help: {
getInAppMessages: GenericDefinition;
Expand All @@ -145,7 +219,7 @@ export namespace actions {
const submissions: {
getSubmission: GetSubmissionDefinition;
getSubmissionByUuid: GetSubmissionDefinition;
getSubmissions: GenericDefinition;
getSubmissions: GetSubmissionsDefinition;
getProcessingSubmissions: GetProcessingSubmissionsDefinition;
bulkDeleteStatus: GenericDefinition;
bulkPatchStatus: GenericDefinition;
Expand Down
3 changes: 0 additions & 3 deletions jsapp/js/actions.es6
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ permissionsActions.assignAssetPermission.completed.listen((uid) => {
permissionsActions.copyPermissionsFrom.completed.listen((sourceUid, targetUid) => {
actions.resources.loadAsset({id: targetUid});
});
permissionsActions.setAssetPublic.completed.listen((uid) => {
actions.resources.loadAsset({id: uid});
});
permissionsActions.removeAssetPermission.completed.listen((uid, isNonOwner) => {
// Avoid this call if a non-owner removed their own permissions as it will fail
if (!isNonOwner) {
Expand Down
Loading

0 comments on commit fc21ac2

Please sign in to comment.