Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id "jacoco"
}

version "0.8.0"
version "0.8.1"
group "com.objectcomputing.checkins"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.micronaut.scheduling.annotation.ExecuteOn;
import io.micronaut.security.annotation.Secured;
import io.micronaut.security.rules.SecurityRule;
import io.micronaut.cache.annotation.CacheInvalidate;
import jakarta.validation.constraints.NotNull;

import java.util.List;
Expand Down Expand Up @@ -34,6 +35,7 @@ HttpResponse<?> deleteMemberRole(@NotNull UUID roleId, @NotNull UUID memberId){
}

@Post
@CacheInvalidate(cacheNames = {"role-permission-cache"})
HttpResponse<MemberRole> saveMemberRole(@NotNull @Body MemberRoleId id){
MemberRole memberRole = memberRoleServices.saveByIds(id.getMemberId(), id.getRoleId());
return HttpResponse.ok(memberRole);
Expand Down
2 changes: 1 addition & 1 deletion web-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-ui",
"version": "0.8.0",
"version": "0.8.1",
"private": true,
"type": "module",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/components/settings/types/boolean.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const SettingsBoolean = ({ name, description, value, handleChange }) => {
</label>
{description && <p>{description}</p>}
<Switch
disableRipple
id={labelId}
className="settings-control"
type="checkbox"
Expand Down
25 changes: 22 additions & 3 deletions web-ui/src/pages/AnniversaryReportPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
noPermission,
} from '../context/selectors';
import { useQueryParameters } from '../helpers/query-parameters';
import SkeletonLoader from '../components/skeleton_loader/SkeletonLoader';

const months = [
'January',
Expand All @@ -43,6 +44,7 @@ const AnniversaryReportPage = () => {
const [searchAnniversaryResults, setSearchAnniversaryResults] = useState([]);
const [selectedMonths, setSelectedMonths] = useState(defaultMonths);
const [hasSearched, setHasSearched] = useState(false);
const [loading, setLoading] = useState(false);

useQueryParameters([
{
Expand All @@ -57,9 +59,22 @@ const AnniversaryReportPage = () => {
]);

const handleSearch = async monthsToSearch => {
const anniversaryResults = await getAnniversaries(monthsToSearch, csrf);
setSearchAnniversaryResults(sortAnniversaries(anniversaryResults));
setHasSearched(true);
setLoading(true);
try {
const anniversaryResults = await getAnniversaries(monthsToSearch, csrf);
setSearchAnniversaryResults(sortAnniversaries(anniversaryResults));
setHasSearched(true);
} catch(e) {
console.error(e);
window.snackDispatch({
type: UPDATE_TOAST,
payload: {
severity: 'error',
toast: e,
}
});
}
setLoading(false);
};

function onMonthChange(event, newValue) {
Expand Down Expand Up @@ -111,6 +126,10 @@ const AnniversaryReportPage = () => {
</div>
<div>
{
loading ?
Array.from({ length: 10 }).map((_, index) => (
<SkeletonLoader key={index} type="feedback_requests" />
)) :
<div className="search-results">
<SearchBirthdayAnniversaryResults
hasSearched={hasSearched}
Expand Down
24 changes: 21 additions & 3 deletions web-ui/src/pages/BirthdayReportPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getBirthdays } from '../api/birthdayanniversary';
import { UPDATE_TOAST } from '../context/actions';
import SearchBirthdayAnniversaryResults from '../components/search-results/SearchBirthdayAnniversaryResults';
import { sortBirthdays } from '../context/util';
import SkeletonLoader from '../components/skeleton_loader/SkeletonLoader';

import {
selectCsrfToken,
Expand Down Expand Up @@ -43,6 +44,7 @@ const BirthdayReportPage = () => {
const [searchBirthdayResults, setSearchBirthdayResults] = useState([]);
const [selectedMonths, setSelectedMonths] = useState(defaultMonths);
const [hasSearched, setHasSearched] = useState(false);
const [loading, setLoading] = useState(false);

useQueryParameters([
{
Expand All @@ -57,9 +59,21 @@ const BirthdayReportPage = () => {
]);

const handleSearch = async monthsToSearch => {
const birthdayResults = await getBirthdays(monthsToSearch, csrf);
setSearchBirthdayResults(sortBirthdays(birthdayResults));
setHasSearched(true);
setLoading(true);
try {
const birthdayResults = await getBirthdays(monthsToSearch, csrf);
setSearchBirthdayResults(sortBirthdays(birthdayResults));
setHasSearched(true);
} catch(e) {
window.snackDispatch({
type: UPDATE_TOAST,
payload: {
severity: 'error',
toast: e,
}
});
}
setLoading(false);
};

function onMonthChange(event, newValue) {
Expand Down Expand Up @@ -111,6 +125,10 @@ const BirthdayReportPage = () => {
</div>
<div>
{
loading ?
Array.from({ length: 10 }).map((_, index) => (
<SkeletonLoader key={index} type="feedback_requests" />
)) :
<div className="search-results">
<SearchBirthdayAnniversaryResults
hasSearched={hasSearched}
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/pages/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ const SettingsPage = () => {
selectHasAdministerSettingsPermission(state) &&
<div className="buttons">
<Button
disableRipple
color="primary"
onClick={save}>
Save
Expand Down
6 changes: 0 additions & 6 deletions web-ui/src/pages/__snapshots__/SettingsPage.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ exports[`SettingsPage > renders correctly 1`] = `
<span
class="MuiSwitch-thumb css-jsexje-MuiSwitch-thumb"
/>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</span>
<span
class="MuiSwitch-track css-1yjjitx-MuiSwitch-track"
Expand Down Expand Up @@ -125,9 +122,6 @@ exports[`SettingsPage > renders correctly 1`] = `
type="button"
>
Save
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
</div>
Expand Down